Disappointed by the guestbook 3.6 example

View: New views
4 Messages — Rating Filter:   Alert me  

Disappointed by the guestbook 3.6 example

by Nicolas Brasseur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi,

I've reviewed the Guestbook 3.6 example (http://wiki.magnolia-cms.com/display/WIKI/Guestbook+for+3.6). I am a bit disappointed by the amount of Java code stored in the JSP page.
Is there another strategy to handle the same use-case but put the java code in some king of action/filter/controller instead of in the view layer ?

any advice ?

Nicolas



     

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: Disappointed by the guestbook 3.6 example

by Giancarlo F. Berner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Nicolas

Yes, you are right, there is a lot of code in the JSP. The purpose  
though is to show in a simple and easy way how to create nodes and  
properties programmatically. The guestbook is just a sample how you  
could use this.
There are many other strategies you can follow, even some MVC  
patterns. However, the purpose is to UNDERSTAND how to add content  
dynamically. Once you got that, you can use any kind of strategy you  
think will fit your needs.

You can of course prepare FreeMarker model classes or even use filters  
to detect guestbook entries. But this example was simply to let  
audiences create a simple working example to study the way you deal  
with programmatically generated content.

Sorry for the confusion. I did actually never expect anybody to have  
one fully coded JSP for a guestbook. I will add some comments that the  
purpose is to demonstrate in some easy-to-repeat steps how to  
dynamically add content.

Thanks for pointing this out!
Giancarlo


On Jun 19, 2009, at 9:45 AM, Nicolas Brasseur wrote:



Hi,

I've reviewed the Guestbook 3.6 example (http://wiki.magnolia-cms.com/display/WIKI/Guestbook+for+3.6 
). I am a bit disappointed by the amount of Java code stored in the  
JSP page.
Is there another strategy to handle the same use-case but put the java  
code in some king of action/filter/controller instead of in the view  
layer ?

any advice ?

Nicolas





----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------




----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: Disappointed by the guestbook 3.6 example

by gregoryjoseph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Jun 19, 2009, at 6:45 PM, Nicolas Brasseur wrote:

>
>
> Hi,
>
> I've reviewed the Guestbook 3.6 example (http://wiki.magnolia-cms.com/display/WIKI/Guestbook+for+3.6 
> ). I am a bit disappointed by the amount of Java code stored in the  
> JSP page.
> Is there another strategy to handle the same use-case but put the  
> java code in some king of action/filter/controller instead of in the  
> view layer ?

Definitely - you could use the form module's FormHandler, or maybe  
more straightforward, at template or paragraph model
http://wiki.magnolia-cms.com/display/DEV/Renderer,+Model+and+Template+Definition
http://documentation.magnolia-cms.com/reference/templating.html#Templateandparagraphmodelaction

>
> any advice ?
>
> Nicolas
>
>
>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <user-list-unsubscribe@...>
> ----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------


Re: Disappointed by the guestbook 3.6 example

by Boris Kraft-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


why not simply use the forum module?
- B

On Jun 19, 2009, at 7:59 PM, Grégory Joseph wrote:

>
>
> On Jun 19, 2009, at 6:45 PM, Nicolas Brasseur wrote:
>
>>
>>
>> Hi,
>>
>> I've reviewed the Guestbook 3.6 example (http://wiki.magnolia-cms.com/display/WIKI/Guestbook+for+3.6 
>> ). I am a bit disappointed by the amount of Java code stored in the  
>> JSP page.
>> Is there another strategy to handle the same use-case but put the  
>> java code in some king of action/filter/controller instead of in  
>> the view layer ?
>
> Definitely - you could use the form module's FormHandler, or maybe  
> more straightforward, at template or paragraph model
> http://wiki.magnolia-cms.com/display/DEV/Renderer,+Model+and+Template+Definition
> http://documentation.magnolia-cms.com/reference/templating.html#Templateandparagraphmodelaction
>
>>
>> any advice ?
>>
>> Nicolas
>>
>>
>>
>>
>>
>> ----------------------------------------------------------------
>> For list details see
>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>> To unsubscribe, E-mail to: <user-list-unsubscribe@...>
>> ----------------------------------------------------------------
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <user-list-unsubscribe@...>
> ----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <user-list-unsubscribe@...>
----------------------------------------------------------------