Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: New Mac web developer - suggestions please: CFML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Mac web developer - suggestions please: CFML



I am running on a beta version of my favorite OS & get some quirks with my email client, etc.

I tried several times to respond but the messages got bounced because they were too large.

I snipped everything to avoid more bounces.

Here are some random comments.

Derek's approach to comparing code was unique and led to some surprising results.

One other way, tho subjective, is code readability-- especially to another coder or a lay person.

Because of its verbose tags and keyword=value parameters (instead of positionals), CF tends to lead the programmer to write self-documenting code.

IMO, CF's verbosity is much like that of XML -- it makes it readable by humans.  Unlike XML, there is no penalty for CFs verbosity -- it gets compiled to Java byte code.

But, if you choose, you can write CF code in an ECMA/_javascript_-like format.  In some cases, this is a superior way to solve/document the problem solution.

I don't understand the connotation of calling CF a "Markup" language-- is that bad?  Isn't any computer language except binary-absolute a "Markup" of the ultimate program that the machine executes.

If compactness is the proof of good code, then:

"I can write that program in 1 line of APL code.... "

"...but I can't understand it 10 minutes later"

When I call CF powerful, I refer to the fact that a single CF tag can (under-the-covers) do many things automatically-- the tag is, in fact, a many-for-one macro statement.  For example, the <cfoutput query=...> tag.  This CF tag:

1) Initializes an index
2) increments the index
3) tests the index
4) iterates over the query result set outputting the results, offset by the index

You don't see any of this -- it just works that way.  But, you can write a loop and do it the traditional way-- your choice.

Another way of saying this is "If there is a easy way to define a complex piece of code, CF probably has a tag for it".  This includes everything from screen scraping to manipulating mail, databases, lists, arrays, hashes, cookies, sessions, web services, etc.

But, this does not mean that you need to sacrifice control -- the granularity is there -- you just don't have to use it.

One way to learn a new language is the way I learned CF.  I read some books, tried some examples & was familiar with the concepts (if not the details).
I had just written a general-purpose shopping cart/catalog in Perl-- about 100K lines of code.  I fired up BBEdit, and copied the Perl into an new document.  Section by section, I went thru, deciphering the Perl, commenting it out and replacing it with equivalent CF tags.  Initially, I had to look up every tag in the docs and look at some relevant sample code.  But, I started to get the hang of it.  After about 10 hours (and some false starts) I had 100% CF code with embedded Perl comments.  I tried it & it ran with some bugs-- after another hour, or so, I had a running CF shopping cart.  I went back and stripped out the Perl code & ended up with a program that 35K lines of code-- 35% the size of the original.  Four things really impressed me:

1) The macro power (one for many) of a CF tag vs multiple Perl statements to do the same things (the reduced size of the source code).
2) The amazing number of details that I didn't need to fiddle with in CF-- it did what I wanted to do automatically -- they designed it that way.
3) I, or anyone, could read the code-- minimal comments were necessary.
4) How easy it was to learn CF to the point where I felt comfortable (enough) to attack any web problem.

I saw my first Mac in Nov 1983.  I have used many programming languages, octal-absolute, Assembly, etc. thru Java, VBS, etc.

IMO, CF comes closest to meeting the concepts behind Apple and the Mac-- things like:

  "Simplicity is the ultimate sophistication"
 
  "It just works"

  "There is no step three"

  "Computers [programming] for the rest of us"

Finally, some thoughts on the future:

The next big thing for the average computer user could well be putting all his "stuff" on the web, so he can share it with friends & family-- music, pictures, video, thoughts, family trees, etc.  Let's call this iWeb.  Apple has a good start with this with its .Mac offering.  But many users will want to go beyond the canned capabilities of .Mac -- maybe even run a small home business on the web.

What is needed is a set of programs that do the basic iWeb functions.  These must be written in a language that is easy to read/learn/understand/modify by non-programmers.

CFML is the answer -- nothing else comes close.

Yes, you can do this today -- and the CF engine required is free.

Dick



On Nov 30, 2004, at 10:48 AM, Derek wrote:



PHP, JSP, CF, etc... are integration scripting languages meant to glue
together sometimes disparate pieces of programming (Java, COM objects,
etc...) and then present them in an HTML/XHTML/XML/WAP text format of some
sort.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: New Mac web developer - suggestions please: CFML (From: Derek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.