Fornax-Platform
Forum

 « Return to Thread: SmartClient frontend demo

Re: SmartClient frontend demo

by Patrik Nordwall :: Rate this Message:

Reply to Author | View in Thread

I'm impressed. Now I think I understand what you have developed. Is this understanding correct? In runtime (startup) your servlet analyzes the classes and configuration in business tier jar file. From that information it builds a SmartGWT GUI using the SmartClient Java Script API (or is it Java?).

Customization is interesting/important. I see several options. Let us discuss.

Your servlet could be customized in one of these ways:
1. You define a model (POJOs) that can be populated with customization data. The servlet use the information in the instantiated model to build the GUI.
2. You define an ordinary API that can be used to customize the servlet.
3. You define an Internal DSL (fluent API) that can be used to customize the servlet.

Sculptor GUI DSL is a natural input for the customization, but there should also be possibility to add hand written code/configuration. How to use the information in the GUI DSL?
a) You could generate java code (one of the options 1-3) above
b) You could generate xml that is used to populate option 1 above
c) You could parse Sculptor DSLs in runtime (using oAW) and customize the servlet in runtime (no code generation)

My opinion with very limited insight in everything.
I think 1 combined with a) would be good. Maybe you already have a nice separation of the reflection/config analyze step from the GUI building? Maybe you already have such an model?

c) is interesting, since it removes the code generation step, but I think it adds more complexity (and runtime dependencies).

/Patrik

PaloT wrote:
Hello,
SmartClient frontend sample generated from attached
model-library.design is available at:

http://f4.rainside.sk:8080/library

It's not optimized (not compression, GWT with 'pretty' option, slow
connection). First load should take sometimes 40-50 sec. 2nd time
should be faster. Everything what you see is coming from default code
generated by Sculptor entity tier. No GUI definition, additional code
or something was written.

Technical details:
SC client is now using extensively all dirty tricks available in Java.
Reflection, Spring context investigation, Hibernate mapping parsing,
... . WEB Client doesn't contain any business specific code which is
written or generated. Only sculptor generated entity JAR file is
dropped to web project. Everything else is done on the fly.

Working features:
* Hibernate definition (datatype, length, required, relations, ...)
investigated on the fly
* Spring services investigated on the fly (GUI strictly follow service
definition)
* Additional annotations for services for customizing behavior
* Layout change (2 layouts)
* Skin change (5 skins)
* Language change
* Status field handling (IfStatus actions, DetailBehavior, ...)
* Translation file (have no time writing one for demo, only generated texts)
* Grid/List layout saving (computed columns, column reordering, column
sizes - right click on table header) - saving status is turned off in
demo (require special service and entity)
* Client side filtering, ordering
* Lazy loading in lists on client side and paging in servlet
* Error handling

Unresolved problems:
* Inheritance and abstract classes don't work very well - in queue
* How to do customization :-D (expecting discusion about this,
specially if (and what) we should generate for web tier, for now
nothing is necessary, everything what you see is done by on the fly
mapping)!!!
* Working ONLY with sculptor version 1.5 - postponed

Code:
* Now I'm in process of Fornaxing code (cutting out some dependecies,
package refactoring, ...)
* Servlet is aroud 2000 lines of code
* GUI is in SmartGWT around 1500 lines
* Copyright have to stay for company (Factory4Solutions), license will be LGPL

Any ideas, suggestions, recommendations, criticism and compliments are welcome

Enjoy

Pavel

PS: Please don't hack this box. It's virtual server with empty JBoss
and empty MySQL inside.

 
------------------------------------------------------------------------------

_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

 « Return to Thread: SmartClient frontend demo