Re: Architecture thoughts

2005-08-10 Thread Thomas Chiverton
On Tuesday 09 August 2005 18:32, Dawson, Michael wrote:
 We are currently working on a small project to test AJAX feasibility for
 us.  We found that it is a great deal of work compared to simple page

I've got a simple wrapper JS function that goes around the Sarissa crosbrowser 
xmlHttpRequest, and allows me to say
xmlDoc=makeRequest('getUserDetails','userid=32');
This is translated inside makeRequest into a HTTP form post.

The wrapper handles all the client-side error reporting and traps.
The wrapper calls a single server-side .cfm page,which basically acts as a 
fusebox/switch, and returns empty strong or an xml doc. Errors are trapped 
and logged, as well as passed back to the client for display.

This makes it very, very easy, and fast.
I'm hopefully going to get a chance to write up some details in my blog today.

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214304
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread Thomas Chiverton
On Monday 08 August 2005 23:34, Marlon Moyer wrote:
 ability to use flash, html, ajax,etc.  I was thinking about creating
 all of the business logic as a set of web services.  Any thoughts,

Pitfall- web services are slow to execute, certainly much slower than an Ajax 
post/get.

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214121
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread S . Isaac Dealey
 On Monday 08 August 2005 23:34, Marlon Moyer wrote:
 ability to use flash, html, ajax,etc.  I was thinking
 about creating
 all of the business logic as a set of web services.  Any
 thoughts,

 Pitfall- web services are slow to execute, certainly much
 slower than an Ajax
 post/get.

I thought AJAX apps generally used webservices to fetch their data...
isn't that the reason they use the XmlHttpRequest object? (and the
reason why X ended up in the acronym).


s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214170
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread Thomas Chiverton
On Tuesday 09 August 2005 15:49, S. Isaac Dealey wrote:
 I thought AJAX apps generally used webservices to fetch their data...
 isn't that the reason they use the XmlHttpRequest object? (and the
 reason why X ended up in the acronym).

In the context of having to submit a form, run the webservice server-side, and 
return a new page, a native Ajax request will be much faster.
'Course, you then have to expose your webservices to the world, which has 
security concerns...
That's what I meant.

-- 

Tom Chiverton 
Advanced ColdFusion Programmer

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214173
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread S . Isaac Dealey
 On Tuesday 09 August 2005 15:49, S. Isaac Dealey wrote:
 I thought AJAX apps generally used webservices to fetch
 their data...
 isn't that the reason they use the XmlHttpRequest object?
 (and the
 reason why X ended up in the acronym).

 In the context of having to submit a form, run the
 webservice server-side, and
 return a new page, a native Ajax request will be much
 faster.
 'Course, you then have to expose your webservices to the
 world, which has
 security concerns...
 That's what I meant.

I must have missed the context 'cause I'm still lost. but okay. :)

s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214177
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread Barney Boisvert
I rarely use web services, instead preferring to just use GET and POST
operations.  The XmlHttpRequest object was designed for fetching
remote XML, but it's really nothing more than an HttpRequest object,
and can be used as such.  There's some XML-related stuff, but at the
core is just simple HTTP.

If you're doing complex data passing, web services are very helpful,
particularly the ability to have multiple typed parameters and complex
data that is automatically marshalled/unmarshalled for you, but for
simpler stuff, GET and POST are more than adequate.  Web services also
have a fairly high spin-up cost for parsing the WSDL and making the
stubs and stuff.  Not a big deal if you have a single page UI that
does everything dynamically, but if you're still switching pages and
just doing dynamic things within those pages, that cost can be
prohibitive.

Since GET/POST don't require any of that, they don't have any
initialization cost except making an HTTP connection (something
browsers are good at), and are therefore ridiculously fast.

cheers,
barneyb

On 8/9/05, S. Isaac Dealey [EMAIL PROTECTED] wrote:
 I thought AJAX apps generally used webservices to fetch their data...
 isn't that the reason they use the XmlHttpRequest object? (and the
 reason why X ended up in the acronym).
 
 
 s. isaac dealey 954.522.6080
 new epoch : isn't it time for a change?


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214193
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Architecture thoughts

2005-08-09 Thread Dawson, Michael
We are currently working on a small project to test AJAX feasibility for
us.  We found that it is a great deal of work compared to simple page
refreshes.  However, the stuff is very cool and has some great
potential.

We do not use web services, so to speak.  I created a simple page that
returns an XML packet to the AJAX request.  Simple and very effective.

M!ke

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 9:50 AM
To: CF-Talk
Subject: Re: Architecture thoughts

 On Monday 08 August 2005 23:34, Marlon Moyer wrote:
 ability to use flash, html, ajax,etc.  I was thinking about 
 creating all of the business logic as a set of web services.  Any 
 thoughts,

 Pitfall- web services are slow to execute, certainly much slower than 
 an Ajax post/get.

I thought AJAX apps generally used webservices to fetch their data...
isn't that the reason they use the XmlHttpRequest object? (and the
reason why X ended up in the acronym).

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214217
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-09 Thread Barney Boisvert
Have to second this one.  Just like Flash, building DHTML/JS Remoting
apps is a lot of work.  If you've got a large HTML-based UI already,
however, there are often places where some simple remoting calls can
make a HUGE difference in percieved performance and user friendliness.

As an example, a page where you have a list of items that you can
check one or more, and the do something to them.  You often want to
do multiple actions to the same set of items, and if you perform the
action behind the scenes, the user can just call each action in
sequence without waiting for page refreshes or having to recheck the
items.

Another place is form validation for stuff that can only be validated
server-side.  For example, uniqueness of incoming usernames. 
Ordinarily you check for the presence of a value with JS, and then
submit to the server for the unqueness check, and possibly return the
user to the form to pick a different (unique) username.  With a JS
Remoting call, you can make that uniqueness check as part of the JS
validation.  Still have to check server-side, of course, but doing it
client-side makes for a much nicer user experience.

cheers,
barneyb

On 8/9/05, Dawson, Michael [EMAIL PROTECTED] wrote:
 We are currently working on a small project to test AJAX feasibility for
 us.  We found that it is a great deal of work compared to simple page
 refreshes.  However, the stuff is very cool and has some great
 potential.
 
 We do not use web services, so to speak.  I created a simple page that
 returns an XML packet to the AJAX request.  Simple and very effective.
 
 M!ke


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214219
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Architecture thoughts

2005-08-08 Thread Barney Boisvert
Implement your application as a set of CFCs that your UI's connect to.
 For HTML, they'll hit them directly.  For Flash and JS Remoting,
you'll use some facade CFCs.  The application CFCs would be
instantiated via Application.cf(m|c), so they're always present, no
matter what type of connection is coming in.

You don't want to actually put the application into the web services,
there should be an entirely separate facade layer (which is really the
UI, the clients of the web services are irrelevant to you, the app
developer).  Each web service invocation instantiates the listening
CFC, so it's important those CFCs are as lightweight as possible, and
then delegates to the real application CFCs to do the actual
processing.

And it's worth mentioning that you can use Model-Glue without
initializing the backend with a config bean.  Though if you're going
to go that route, I'd probably use a config bean that's simply a
delegate to the real backend, so you're still using the config bean
mechanism, just the bean you're loading is just a passthrough to the
real app.  That way both sides remain agnostic of the other.

cheers,
barneyb

On 8/8/05, Marlon Moyer [EMAIL PROTECTED] wrote:
 I'm tossing around ideas for the architecture for a new project.  I'd
 like to keep the interface flexible, meaning I'd like to have the
 ability to use flash, html, ajax,etc.  I was thinking about creating
 all of the business logic as a set of web services.  Any thoughts,
 pitfalls that I should avoid.
 
 I really like the idea of separating out the interface from the
 business logic completely.  I like the model-glue framework from a
 high level but I get an icky feeling when I have to start initializing
 the model with a config-bean from what should be the UI.
 
 Just thinking out loud I guess.
 
 
 --
 Marlon
 
 A mulatto, an albino, a mosquito, my libido
 
-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214114
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54