Hi Tom,
What you say makes sense at the face
of it but when you get into the details... does it really buy you anything?
When you ask a graphics designer to
to design something for you they basically do it the way they want to.
You can ask for this or that but in the end you will have to put the images
somewhere. You will get upset it's not xhtml compliant and tweak the code.
You are going to add your "webojects" tags. You are actually
going to massage those files in many different ways. It is very rare that
you'll get something complete that you can totally plug and play.
What is the real difference in taking
the time to break out the presentation in HTML / .wod versus doing it in
pure programming as in the snippet I showed? Very little. In essence you
are paying the designer to give you something that looks good, it is still
your job to put it into a dynamic web app.
So for roughly equivalent effort to
setup your app you then gain the ability to read it easier and refactor
it. In the long run it is a big win. This is one of those things you need
to try before you discount it.
Remember how we used to "pretty
print" or "reformat" in the WOBuilder days? Perhaps I'm
now showing my age... It was beautiful. I miss that. I can actually do
that in Seaside by just asking the syntax to reformat. It's just like you
ask Eclipse to auto-indent your java source.
-- Aaron
Just in response to that last part... Command-shift-F works fine for me to reformat a WOComponent's html in WOLips. It uses spaces instead of tabs though, which bugs the crap out of me. Well, enough not to use it very often, but not enough to actually find a way to make it use tabs when I use it. (^_^)
Ramsey
From:
"Tom M. Blenko"
<email@hidden>
To:
email@hidden
Cc:
WebObjects Mailing
List <email@hidden>
Date:
09/28/2011 01:21 PM
Subject:
Re: Finding
WO people for startups (cult of the dead)
I also prefer .html/.wod model because it's (close to)
separating view and controller.
I'm accustomed to receiving HTML from someone who, e.g.,
cuts the page, provides images, puts in pro-forma tags for active elements.
The supplier is responsible to deliver a page (he wraps it in a little
PHP) that is displayable and tested across browsers (I think he tests against
17 of them). I then insert the active elements, supply _javascript_, etc.
I also may receive updates to the page in HTML (in which case I'm doing
some kind of diff on HTML and update on HTML/wod).
It looks to me as if this process is going to become a
lot more work on my side and a lot more error prone if I go to this non-HTML/"single
source" approach -- unless I get the HTML supplier to instead give
me Seaside.
Am I understanding this correctly?
Tom
On Sep 28, 2011, at 9:38 AM, email@hidden
wrote:
Hi Chuck,
I can feel your gears turning. That's a good thing!
1) PHP is nothing but a template file (with embedded programming)
2) WO has a template file, a programming file, and it also has "in-line"
binding which I've never been a fan of. Then there is the OGNL too...
3) Seaside is nothing but programming logic.
So PHP is on one side and Seaside is on the other. WO is in the middle.
We all can agree that the PHP, JSP, etc. way is a nightmare. You can make
good software but you have to work harder.
WO way is better. For many years I really liked the way the .html / .wod
was nothing but presentation and bindings. OGNL is cool for quick and dirty
but it didn't feel right to me being too cluttered like the PHP way and
hard to debug. Inline bindings also clutter the HTML file and never resonated
with me either. Maybe... perhaps its cool for a WOString with a single
value but anything other than that... I'd rather someone use the .wod file.
The Apple way was insane, you had to do all inline bindings or none. The
WOnder way is best, able to mix the two.
In WO there is the minor hassle of finding the line in HTML that matches
up with the .wod file. Using WOlips this is easy because it finds it for
you and jumps you right there to synchronize the two files in a split view.
One thing WOLips can't do is refactor that code. Only Java code is refactorable.
You also have to be extremely astute that you output correct and balanced
HTML
Seaside way is best. By using a living language, everything is immediate,
you don't feel the urge to cheat like with OGNL. By removing the template
file entirely and using objects you get so many benefits.
1) No extra files to coordinate.
2) no HTML syntax problems.
3) you can refactor ALL of your code, not just the business logic.
4) you can still partition your presentation logic - but instead of putting
it in a different file you put it in a method.
5) did I mention everything is alive? There isn't even a source code file
to deal with. No compiling, no interpreting static files, no need for an
add-on like JavaRebel. In Eclipse you can query for methods given part
of a name you remember. In Smalltalk you can query for methods that take
such and such parameters and evoke a certain value, you don't even have
to know the method name. Smalltalk will immediately give you a handful
of methods that do "greatest common denominator" for example.
"Living" versus "Living Dead" there is a difference
but I digress.
Here is an example of how presentation is rendered in Seaside. Bare in
mind that "renderContentOn" is akin to "appendToResponse".
And that "html" is an object which gets passed into the method
that is a bit like a WOContext and a String buffer rolled into one. In
this example it is going to render an HTML table with table rows and table
data cells:
renderContentOn: html
html table: [
html
tableRow: [
html tableData: [html text: 'Table entry']];
tableRow: [
html tableData: [html text: 'Table entry']]].
Look foreign? Perhaps but it's worth getting your feet wet and kicking
these ideas around. I've seen many things and this is the first set of
tools and processes that make me feel good. Like it is equivalent and perhaps
better than WO. It's brain dead easy to install and there are a number
of tutorials out there.
-- Aaron
From: Chuck
Hill <email@hidden>
To: email@hidden
Cc: WebObjects
Mailing List <email@hidden>
Date: 09/27/2011
06:02 PM
Subject: Re:
Finding WO people for startups (cult of the dead)
Hi Aaron,
On 2011-09-27, at 9:19 AM, email@hidden
wrote:
> What is cool about Smalltalk / Seaside with respect to WO?
>
> 5) Even better than "in-line" binding it has no template
file what-so-ever by design. All your HTML output is coded in the programming
language. No more unbalanced DIV tags. Everything is refactorable.
Is that better? In my imagination that makes it like PHP. Would
that not obstruct what little view of page structure that is still there
in WO?
--
Chuck Hill Senior Consultant
/ VP Development
Practical WebObjects - for developers who want to increase their overall
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|