Thanks for your explications. PS I don't want to start a discussion but my excerpt is clear, with the package: package com.claymus.site.module.page;
and the definition of the class: @PersistenceCapable(detachable = "true") public class Page extends PersistentCapable { This page is clearly a Data Access Object (not a servlet) and one off it's method 'serve' output html. On Jul 22, 8:18 pm, Prashant <antsh...@gmail.com> wrote: > Hello Michel, > > Thanks for checking out the code and the query :) > > On Thu, Jul 21, 2011 at 9:49 PM, Michel Schroeder <michels...@gmail.com>wrote: > > > Hello, > > > Thanks for your contributions for a GAE-Java CMS. > > > I had a look at the code of claymus. It seems that you use the > > combination of gae and gwt, this is a very interesting point. > > > But on the client side, some architectural questions come to my > > mind... > > > I don't understand your separation of code responsability? > > Code separation is done considering mainly, modularity and pluggability of > modules. All the classes related to a module are placed in a package (and > sub-packages) meant for that module. Modules are designed such that it won't > affect the functioning of App or other modules if a new module is added or > an old one (which is not a core module) is removed from the App. > > Up to now, I don't see something like MVC or MVP or UI Builder ... It > > > seems that your write the html output directly from java (and that in > > the same file that the DAO definition if I am not wrong)... > > Yes, I didn't try to follow MVC or MVP strictly because I don't think that > is a strict requirement. I din't use UI Builder because none of the GWT > modules have very big and/or complex UI. If you are worried about supporting > mobile devices, that can supported just by creating a mobile theme (which > will include layout and look & feel) and few tweeks in Content and Block > types. > > I think you are thinking of following methods as Data-Access methods. They > are not Data-Access methods, they are just converting Data Object to Data > Transfer Object. PageData class, in the same package, is the DAO for page > module. > > public PageDTO getDTO() { > PageDTO pageDTO = new PageDTO(); > pageDTO.setUri(getUri()); > pageDTO.setTitle(getTitle()); > pageDTO.setLayout(getLayout().getClass().getSimpleName()); > return pageDTO; > > } > > public void update(PageDTO pageDTO) { > setTitle(pageDTO.getTitle()); > setLayout(pageDTO.getLayout()); > > } > > And, I don't see any thing wrong in outputting html from a java servlet. > > Could you explain a bit the advantages of your strategy? > > > > I am not following popular design architectures, like MVP and MVC, that may > have some disadvantages that I am not aware about now. > > I am trying to support maximum modularity and plaggability like any other > CMS. e.g. if you have to add a new Content or Block type, you just need to > write 2 small classes, one for backend and one for front-end (see > com/claymus/site/module/block/types/RichText.java and > com/claymus/site/module/block/types/gwt/RichText.java) and drop them in to > Content/Block Types package. Same for a theme. > > > > > > > > > A lot of people could think that a bad separation of responsibilities > > will lead to a lot of difficulties in code maintenance and > > evolution... > > > But it must be subtilities in your approach that I don't catch up to > > now...? > > > Thanks in advance for your explanations, > > > Michel > > > PS: > > I look for example in: > > package com.claymus.site.module.page; > > (...) > > @PersistenceCapable(detachable = "true") > > public class Page extends PersistentCapable { > > (...) > > public void serve(List<List<Content>> contents, List<List<Block>> > > blocks, Theme theme) throws ServletException, IOException { > > > PrintWriter out = ClaymusMain.getResponse().getWriter(); > > > // DOC TYPE > > out.print(getDocType()); > > > out.print("<html>"); > > (...) > > > On Jul 18, 5:50 pm, Prashant <antsh...@gmail.com> wrote: > > > Yes, you are right. Picking an opensource project and making it work for > > you > > > is very easy, but making something from scratch has its own fun :) . I > > > stared building Claymus because I felt need of Java based CMS which is > > made > > > for GAE, considering what GAE is, how it is different from other hosting > > > services, services/apis GAE is providing to developers, etc. etc. etc. > > > > Claymus is designed to give you maximum flexibility and support to build > > > your app on top of Claymus. Along with all the GAE features you can take > > > advantage of Servlet Level caching to minimize delay and cpu usage, > > plugable > > > modules and themes, etc ... (complete list will be put on updated Claymus > > > Website :) ). > > > > Regards, > > > Prashant > > > > On Mon, Jul 18, 2011 at 7:28 PM, Niklas Rosencrantz <nikla...@gmail.com > > >wrote: > > > > > Having something like a CMS eg like wordpress, joomla or mediawiki > > > > compatible then we won't have to start every project from scratch and > > > > project would become more configuration than programming which > > naturally is > > > > an advantage since programming takes more time than just configuring a > > new > > > > CMS deployment. I used web2py for a project when a friend wanted a > > quick > > > > website started and naturally to change pages we'd prefer a web-based > > editor > > > > instead of changing templates and redeploying. I'm glad to see some CMS > > are > > > > coming to app engine. Some frameworks offer features that are getting > > close > > > > to that of a CMS, for instance GAE Framework (www.gaeframework.com) > > comes > > > > with a blog engine and when you have a blog you are getting close the > > the > > > > functions of a CMS. Do you agree? > > > > > On Sun, Jul 17, 2011 at 3:48 AM, Maneesh Arora <mane...@gmail.com> > > wrote: > > > > >> What's the unique advantage of having a CMS in GAE? > > > > >> thanks, > > > > >> Maneesh > > > >>http://mightytext.net > > > > >> On Sat, Jul 16, 2011 at 11:25 AM, Prashant <antsh...@gmail.com> > > wrote: > > > > >>> Hi All, > > > > >>> Claymus is close to its (first) preview release. Only few bug fixes > > and > > > >>> minor modifications are remaining. Check out the live demo at > > > >>>http://demo.claymus.com. > > > > >>> -- > > > >>> Prashant > > > >>> claymus.googlecode.com > > > > >>> On Wed, May 25, 2011 at 10:29 AM, Jeff Schnitzer < > > j...@infohazard.org>wrote: > > > > >>>> On Mon, May 23, 2011 at 11:17 AM, Brandon Wirtz < > > drak...@digerat.com> > > > >>>> wrote: > > > >>>> > That's more deployed, not "spoken". Every Blogger and IT guy on > > the > > > >>>> planet > > > >>>> > can hack together a PHP Plugin for their CMS. Very Few can do > > that in > > > >>>> > Python or Java. > > > > >>>> ...and even fewer can do it in Ruby or C#. > > > > >>>> Truly, PHP is in a class by itself. > > > > >>>> Jeff > > > > >>>> -- > > > >>>> You received this message because you are subscribed to the Google > > > >>>> Groups "Google App Engine" group. > > > >>>> To post to this group, send email to > > google-appeng...@googlegroups.com. > > > >>>> To unsubscribe from this group, send email to > > > >>>> google-appengine+unsubscr...@googlegroups.com. > > > >>>> For more options, visit this group at > > > >>>>http://groups.google.com/group/google-appengine?hl=en. > > > > >>> -- > > > >>> You received this message because you are subscribed to the Google > > Groups > > > >>> "Google App Engine for Java" group. > > > >>> To post to this group, send email to > > > >>> google-appengine-java@googlegroups.com. > > > >>> To unsubscribe from this group, send email to > > > >>> google-appengine-java+unsubscr...@googlegroups.com. > > > >>> For more options, visit this group at > > > >>>http://groups.google.com/group/google-appengine-java?hl=en. > > > > >> -- > > > >> You received this message because you are subscribed to the Google > > Groups > > > >> "Google App Engine" group. > > > >> To post to this group, send email to > > google-appeng...@googlegroups.com. > > > >> To unsubscribe from this group, send email to > > > >> google-appengine+unsubscr...@googlegroups.com. > > > >> For more options, visit this group at > > > >>http://groups.google.com/group/google-appengine?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Google App Engine" group. > > > > To post to this group, send email to google-appeng...@googlegroups.com > > . > > > > To unsubscribe from this group, send email to > > > > google-appengine+unsubscr...@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/google-appengine?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > google-appengine-java@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.