I love fast development mainly because I'm a lazy son of a batch file and for some reason, I feel that Ruby and Rails was made just for people like me.
Having a server side application that 70% of its tasks sum up to persistence functionality just screamed scaffolding to me. the only obvious difference is that for the sake of using a flex client, i would have to skip over the default view machinery, that are generated by the rails scaffold.
Pre Programming:
I've created the alternative controller template so scaffolding command would generate an XML based web service.
to match that I've written an ActionScript client side that talks CRUD on the one side and hands out a set of a-sync methods on the other side.
The application, is based on the two elements described above, let me have a RoR restful web services that would accommodate a rich client.
The server:
I have employed a standard scaffold script generation with a tweak to the controller template. this change bypasses the standard view that is created by Rails to relay on pure XML rendering.
there is one extra controller that is utilized for configuration data purpose. I use it for authentication, and to extract the entities structure xml file.
The Client:
This part is where the quick admin app comes to play. the AAdmin client enables all CRUD functionality on a list of entities, predefined in an entity xml.
the client logs in, extracts the entity xml file, and presents the table structure and functionality according to the definitional in the file.
Screen shoots:
AAdmin Login Screen. |
The CRUD Data View |
The Create and Edit screen |
Resources:
- controller.rb - scaffold template for xml web services
- controller.rb - original template
- ActiveReasourceClient.as - client side adapter
Any chance of posting some sample code from the CRUD client? It would really speed up my learning / understanding. Thanks
ReplyDelete