Showing posts with label updates. Show all posts
Showing posts with label updates. Show all posts

Sunday, May 27, 2012

Started a new PR1 branch

My Question on Support site for LampCMS project

I started working on a new PR1 version.
I created a new branch on github for this.
All new development is done in PR1 branch for now.

New features I am working on:

Support for multi-site. Running more than on site from single Lampcms library. This is already done.
A simple 'define' of the path to Lampcms/lib directory is all that is needed in the new bootstrap.php file

Moved all configuration files to config folder. Got rid of Points.php and Mycollections.php. All these are now in the !config.ini file. Yes !config.ini got bigger in size but I think its better than having too many configuration files.

Also the config directory can be moved to custom location to prevent it from being overridden during the upgrade (this is already pretty well protected because the !config.ini is not even included in distribution and must be created by renaming or copying !config.ini.dist file, same for acl.ini file)
The language translations directory is now a subfolder in the config directory, so moving config directory to a custom location will protect the translations directory from being overridden.

What I'm really working on now, and this may take decent amount of time is to use url routes concept so that rewrite rules will not be necessary. This will be somewhat similar to CodeIgneter's way, but not the same. It will also be a 2-way mapping - if you rename the route the urls will all be updated dynamically in the site. For example, if you want to access your unanswered questions using /noanswer/ then just changing the route name from 'unanswered' to 'noanswer' will do the trick - the links everywhere in the site will be pointing to '/noanswer/'
while the route will point to the same controller.

Also it will be possible and quite easy to install Lampcms in a subfolder of an existing website. For example, maybe in the '/forum/' directory of your site.

So this new url routing feature will take some time to complete and test. Many templates will have to be updated to use placeholders instead of hard-coding the links.

I'm working on it now.

You can still use the master branch for the previous more stable version or wait for the PR1 with all the good features.

I also changed the coding style a bit in a new version, it's more in line with Symfony2 coding style. Not a big change at all, but class and function opening brackets are in the new line now.

I also got this new IDE - PHPStorm. I like it a lot. Thanks to the good people of JetBrains I got a free license for this open source project. It's the best IDE I worked with so far, and I tried many: Eclipse (still using it for some Java coding and for Android code. What I really hate about Eclipse is that so many times I would install some new plugin and suddenly some old feature stops working and I really need that old feature more than the new plugin but uninstalling plugin does not fix the problem), Aptana (crap), NetBeans (not bad), PHPEd (crap)

Debugging with XDebug works right out of the box with PHPStorm, good support for PHPUnit, and for viewing cachegrind files right in the IDE. Also a nice support for Phing - it recognises the Phing's xml file and you can right-click right in the xml to build a target. And lastly nice support for php codesniffer. This is a less important but still a nice feature. Or, and it has a really good support for all the Git features like creating, switching branches, merging, comparing branches and very good tool to resolve occasional merge conflicts.


Earlier this week I attended the MongoDB NYC conference. It was great - their busiest even even - over 900 attendees. It was really crowded but it was worth it, especially since the company paid for the ticket. I lleared a new new tricks, got some new ideas on using Mongo. Also we starting to use MongoDB at work, got a pretty serious multi-server install with sharding and replica sets.

By the way I work for the ADP now. It's a pretty big company, you probably heard of it.

Anyway, I have alot for work to do.


Click here to post your reply


Saturday, May 19, 2012

Updates and new features

My Question on Support site for LampCMS project

I just pushed the latest updates to github

First of all, the category feature is here, as you may have already noticed you now can select a category when posting a question.

Categories can have sub-categories, and the level of nesting is unlimited.

You can already try the admin page for category editing here:

http://support.lampcms.com/editcategory/

Since you are not admin you can only play with the editor but the changes will not be saved.

The rendering of categories page is not very good yet, I have to work on a template and css for displaying categories better.

2 - I added support for multi-site setup. You can have multiple sites using lampcms on the same server and they all can use a single copy of the lampcms library.

For this to work you just have to uncomment the line in !inc.php
//define('LAMPCMS_LIB_DIR', '/var/lampcms/lib');

and put a full path to location of Lampcms/lib directory
That's all you have to do.

You can even move the Lampcms/lib directory (the directory that contains 3 folders: Lampcms, Pear and fonts folder as well as autoload.php file (which I moved there from the root directory so that autoload can also be reused between sites)

3 - Added Time Zone selection to Edit Profile page so user can select own timezone now. This is just a first step, I still have to go over the rest of the program and update all the places where timezone can be used in order to display correct times in user's timezone.

So download and test these new features.

Next I am starting to work on some refactoring of how site settings are stored. I want to create a single 'settings' directory where we will keep all editable files like !config.ini, !acl.ini, Points.php, Mycollections.php and also soon another editable file to make urls flexible by using 'routes' - something similar to Codeigneter's routes.
The idea is that you will be able to define your own url structure and will no longer need rewrite rules on the web server.

Also there will be the option to define the root web folder so you can add lampcms to existing website and just access in like yoursite.com/commutity/ or yousite.com/community/forum
Basically you will just define a root folder and links will be created dynamically. You can even update this web folder setting any time and all links will be updated since they will be created dynamically now.

Not sure when I will be done with all this, I'm thinking about 8 weeks (I work only couple evenings a week on this site plus 2 days on weekend)

The good news is that I recently started a new job which is 5 days a week, unlike my last job which was 6 day/week. So now I have more time to work on Lampcms.




Click here to post your reply


Saturday, October 8, 2011

Delays in new updates

My Question on Support site for LampCMS project

Just want to let you all know that I have several new features in the pipeline. The new MongoDB-only GeoIP class - no more use of shmop extension since it has been causing problems for some users. Also A lookup of a single IP address to map to a location takes about 3 milliseconds on my Windows PC running MongoDB. I think on a decent Linux server it will be even faster. All IP to Location lookups are done in post process mode. This means the lookup and storing the location data is done after the page has been served to the user and browser connection closed. I also wrote an import script to import the CSV file from MaxMind.com into MongoDB. Import takes 5-10 minutes to complete - there are over 4 million records inserted one by one and also 4 indexes are created.

Second feature - "who's online" module - it depends on GeoIP module because the GeoLocation of users online is extracted from IP and stored. That's why I could not release "Who's online" before the new Mongo based GeoIP module is done, and it is only 95% done - needs some finishing refactoring.

Also working on a nice debug toolbar - the Log data from the script will be viewable in the floating div in the debug mode. I've heard that this is how it's done in codeignitor.

Lastly, I am going to add several changes to templating engine making it also use namespaces and to also use directories for templates for better organization. For example, the templates that have to do with answers will be in template/answers, template to view users will be in template/users, etc...
I also added a nice feature to templating engine that in debug mode it adds the html comment section to indicate the start/end of each template and also start/end of each loop inside the template along with the full path to template file. So debugging templates and debugging in general will become alot easier.

Unfortunately I am not going to have any time for probably the next month. We are very busy at work with the launch of a new web portal for a major company and we are all asked to come to work 7 days a week now.

So realistically I will only have time to actually release all there new features in about 6 weeks.

But I'm still reading and replying to your questions every day.

Click here to post your reply