Wednesday, July 16, 2008

Development CheckPoint

We have been working on PHP framework since 2006.
The development was inspired by the popular J2EE project called hibernate data layer, with Zoop Framework for PHP.
Yet, we can call this another PHP Framework.
We wanted full control over the system flow, therefore we have to develop a new one.

There have been many changes on the framework. As we develop on more business modules, we have evolved the framework for many times.
The initial framework was to have a standardized runtime platform to standardize all page call.
From the long URL request,
[Old Method]
http://www.xyz.com/index.php?request=xxx&module=yyy&var1=12345&var2=56443
[New Method]
http://www.xyz.com/runtime.php/xxx/yyy?var1=12345&var2=56443

The end result of URL is much more shorter.
Data Layer
The concept of data layer helps a lot on the standardization on each table.

Example scenario:
On the traditional method, it is difficult to change business /data logic especially on data validation. Any changes on the data logic requirement will effect all modules which uses that table. Traditional method will burden the programmer to work on more modules on each changes requested from the business view. With the new data layer concept, we need only to add the validation onto 1 class file, and it applies to all the modules. This save time and hassle for the programmer.

Presentation Layer
By using PHP Smarty templating, we were able to change the layout of the website easily and fast. Each template can be utilized in many other modules, thus saving time on development.

AMFPHP Web Service
It was later on that we have made our framework to be AMFPHP Service class compatible. Each call to the service (likely to be flash) goes through similar process as the webbrowser. The debug function of our page call were replaced by NetDebug function of AMFPHP for AMFPHP projects.





S.O.A.P Web Service
Then, it was SOAP trend. People were asking if its possible to extend what we develop with third party solutions! It was amazing ! By using XML technology, developer from different languages are able to cooperate on a concept where nearly every development platform could understand. But the initial development wasn't easy. We have to create WSDL defination file to define our services. And in the final stage, our framework took care of the WSDL generation by using Class! No more hassle on WSDL XML file. Just simple OOP declaration! Cool and Simple :)

http://en.wikipedia.org/wiki/SOAP


Modular Concept
It was later we got inspired by Drupal modular and event hook concept. We couldn't resists more of our ego to implement the concept. W00t, we got it running. We each module detectable by the system, user may install, activate or deactivate modules, and even uninstall the module. It was a big leap for us. We no longer requires all files to be chunked into the objectclass folder, but instead, those files now belong to their respective module folder.

Each module is able to have its own data layers and objects folder. It was able to define its own menu list, installation function, uninstall function, page header runtime, page footer runtime, and even declare its own dependencies module list.
User will be able to adminstrate these modules easily from a form in the back office administration screen.



Google Map API

In our recent project, we were requested by our client to develop a map positioning system to map their site intranet software. It was just the right time when Google open up their Google API. It was fantastic! We linked the data type in the data layer of the table column as Google GPS. And several tweaks on the frontend via javascript enable us to allow user to plot their site position on the map. They were as excited as we are :D. We save both the Longtitude and Latitue with the zoom level to the table field. and Wala, our 1st web based Map plotting software integrated as part of our framework :)
We just found out that Google Map API is now available for flash... cool :)


AJAX Field Update
Ajax has been the fancy word behind Web2.0 trend. We were dreaming of having full control of web front end with data layer. As we have a popup "pick" a record window to allow user to choose the field value from another table, we couldn't control the pick data from the value entered into another field. Therefore, we had put ourself in day and night sweat to work on a Ajax field update concept, similar to DotNet concept. The data layer class were stored into database. Everytime someone update a field in the form, it will trigger ajax call to update the data class. JQuery proves to saved us lots of time. Using the Ajax function of jquery was simple and easy. By using JSON, we were able to convert the updated changes from data class to the front end for updates on the form.


Hmm mm.. okay, lets look at our files count, 91 + 4 files of classes ...


No comments: