hmmm... a bit thin on real ASP.NET stuff (page 8 and only selected bits).
It's pretty obvious the articles author (BF) isn't known as an ASP
programmer...

He makes the point that CF is frugal with code and he's right - to a point
with selected server-side code. but as soon as you integrate HTML and JS
it all turns to sloppy spaghetti.

no, in comparisons, I meant form elements remembering their values when
you want (no repopulating from FORM scope needed), having eleven different
event stages to tap into (as well as defining your own), where <form runat="server"> 
says it
all and you don't have to write ANY javascript to get your control to do
funky things.
 
I also meant the seperation of server side code and presentation that
(IMHO) is the neatist around and beats hands-down OTT methodologies of
FuseBox or Batfink or whatever (see code below). Within one file, all the
processing code is at the top and the display that fires events to it is
at the bottom. Sure you can tweak it as much as Scott Barnes mods FLEX
controls but you can also just set (known) properties that do it all in a
nice OO way, at runtime if you want. Easy - just like a VB windows app.

Sure CFMX is good but it ain't perfect (and neither is ASP.NET). Lets not
kid ourselves that it is, eh?

cheers
barry.b

<% @Import Namespace="System.Data" %>
<% @Import Namespace="System.Data.SqlClient" %>
<script language="vb" runat="server">
  Sub Page_Load(sender as Object, e as EventArgs)
    BindDonationData()
  End Sub
        
  Sub BindDonationData()
    Dim Conn as New
SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
    Const strSQL as String = "sp_donations"
    Dim myCmd as New SqlCommand(strSQL, Conn)
    Conn.Open()
    dgDonations.DataSource =
myCmd.ExecuteReader(CommandBehavior.CloseConnection)
    dgDonations.DataBind() '-- this does all the hard work      
  End Sub
</script>

<!-- and this displays the recordset in a table -->
    <asp:datagrid id="dgDonations" runat="server" />

 





---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to