cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JD Daniels ...@datatrio.com>
Subject Re: Vote: to unify, or not to unify - results
Date Wed, 05 May 2004 09:17:08 GMT
Derek:

Short answer: I'm Hiding from it. heh heh. I have a project now that is 
a month overdue because I tried to jump on the woody --> Cforms 
bandwagon. I am just not Java literate enough.  I came from php...  it 
is the separation of content and logic that made me move to cocoon 
initially. xsps are used strictly to produce xml data. thats why i came 
here. the prospect of sax in php was too much for me. My Ideal 
development would be:

Java Object --> Methods to add, remove, edit things

Flow --> Tells the java objects what to do

Cforms --> The end user's tool to tell the flow what they want to do

JXTemplate --> Cform's method of showing the end user the options


What is stopping me from this utopia of web development is:

PHP:

switch ($formitems)
{
   case count($formitems)>1:
      $itemids=implode("','",$formitems);
      break;

   case count($formitems)==1:
      $itemids=$formitems["0"];
      break;

   default:
      break;

}

$whereclause="WHERE lid IN ('$lid')";

Java:

Huh? switches only work for booleans??
There's how many types of arrays?? (But arrays don't exist? why is a 
list different from a collection?)


Now the first step of my utopia is a nightmare.
I can use xsp to use esql... which 98% of my stuff is merely viewing 
results from databases, so I can continue with my life while I try to 
learn java.

I think most of these types of comments come from PHP users like me...

When I first set myself down to play with a web site, dogpile (before 
google's time :P) put me onto a devshed article on php. so I says to 
myself : "Self, there must be an easier way to send an email from this 
form." go to php.net, type in "mail" in the function search box... five 
minutes later you are emailing. Say, MYSQL only like dates in a certain 
format. go search, get  the date function your done.

The next step:

I decide I love making things for people. I love watching front office 
staff beam when I remove 2/3 of their paperwork.
I like watching a manager's face when he can get a summary of what his 
company's status is at the the push of a button.

Time to step it up a notch. I go to a real estate office. Sit there for 
a few days, make notes, get a big list of how to make them more 
efficient. The result is a really good product. They love it. Generates 
excellent money for me and my family.

It is almost 8000 lines of php. Content and logic all mixed up. About 4 
months in, they wanted a change. simple change really, but finding the 
spot and making the change to the 27 different places it was displayed 
in 9 different templates really, really was not fun.

So I start the search for a "perfect" template system. I discover XML + 
XSLT wow. straight data files I can format any way I want. This is where 
cocoon comes in. I don't worry about separating content and logic. It 
just happens by itself. but I have gone from fast logic development and 
horrible maintainence to super easy maintainence and a nightmare of 
logic development.

Sigh


I think that what people who are asking for "best practices", or "better 
documentation" are php converts who miss the simple days of  " how do I 
do this? " and having an answer in minutes. The way i feel about the 
documention is I imagine searching php.net for the date function and 
getting a result that says " Yup we do that 5 different ways. Enjoy!" 
Very impressive, but I'm still stuck. *grin* But we all know that cocoon 
is not like that. It never will be. PHP is like that because it is a 
shortcut language to a bigger language. Cocoon is a framework where 
anything is possible. I think what the docs need is some good pointers 
to java development. answer questions like "Why should I use a bean?", 
"Compile your bean, put it here, and use in your flowscript this way"

And of course the point of this big rant:

People will follow the easiest path. XSP can function like PHP. I dont 
think it is right, but it happens. I myself do not have much in the way 
of logic in my xsp, just esql queries. You'd think that select only 
queries would be fine, but.. well... when faced with changing a few 
lines to say UPDATE or INSERT from SELECT vs. learning how to make a 
java bean, get a handle on it in flow, and passing the result to 
JXTemplate.... um yeah I'm using xsp for DB updates. I dont want to, but 
I really get my arse confused trying to make sense of javadocs. Plus, 
from php.. edit->save->reload=ok that works to java .. edit, compile, 
upload, reload container, reload page... I know its bad, but I'm lazy 8-)


Probably should shut up now :P

JD


gounis@osmosis.gr wrote:

>On Wed, 5 May 2004, Derek Hohls wrote:
>
>  
>
>>Stavros
>>
>>I also use this approach for read-only queries - but there
>>a number of people here who throw up their hands in horror
>>even at the *idea* of XSP - "not pure" they say - but I 
>>cannot seem to get a handle on what the alternative (better?)
>>approach should be.
>>
>>Conversely, if one is "allowed" to use XSP for this (and yes,
>>there will be a mix of logic and DB calls in such pages) - but
>>not for other DB-related work, then are we not making it very
>>confusing for those coming to Cocoon from, say, a PHP type
>>environment??
>>
>>Derek
>>
>>    
>>
>
>
>i think that there is a big diff from php. if we use XSP just like php 
>then we have to do with all the known problem that become from mixing 
>content and presentation, but xps give us the ubility ti use it in a diff 
>way and produce pure XML, this way we have only content wich can be 
>transofrmated using xsl. (offcourse im talking about read only readn only 
>/ select queries)
>
>-- stavros  
>
>  
>
>>>>>gounis@osmosis.gr 2004/05/04 11:39:40 PM >>>
>>>>>          
>>>>>
>>i recommend the use of xsp/esql ---> xml
>>
>>when the needs are select only queries
>>it very simple/clean and cover the needs in most cases
>>
>>i dont recommend this approach for update queries.
>>
>>--stavros
>>
>>On Tue, 4 May 2004, Ralph Goers wrote:
>>
>>    
>>
>>>I'm confused by your statement. Did you mean that xsp/esql is perfect
>>>      
>>>
>>in
>>    
>>
>>>most cases for you (and your product website), or that you feel it is
>>>      
>>>
>>the
>>    
>>
>>>"best" way to perform an SQL query and that it should be recommended
>>>      
>>>
>>to
>>    
>>
>>>everyone? 
>>>
>>>Ralph
>>>
>>>-----Original Message-----
>>>From: gounis@osmosis.gr [mailto:gounis@osmosis.gr] 
>>>Sent: Tuesday, May 04, 2004 2:14 PM
>>>To: users@cocoon.apache.org 
>>>Subject: Re: Vote: to unify, or not to unify - results
>>>let me put here  my two cents
>>>
>>>for select queries xsp/esql is great and the perfect _in_most_cases_
>>>      
>>>
>>way
>>    
>>
>>>in most cases we create pipelines that make select queries and return
>>>      
>>>
>>the 
>>    
>>
>>>content in xml format. then we call this pipelines in most cases
>>>      
>>>
>>internal.
>>    
>>
>>>--stavros
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>>>For additional commands, e-mail: users-help@cocoon.apache.org 
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>>For additional commands, e-mail: users-help@cocoon.apache.org 
>>
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message