Reply to topic
ASP.NET vs CFMX
webweaver6


Joined: 30 Jan 2004
Posts: 101
Location: Grayslake, IL
Reply with quote
I want to begin developing a new asp.net app to replace a current Cold Fusion app. This app uses and updates a 5 GB MSSQL DB every day. It will also be required to create reports based on queries with over 200,000 records each and produce over 10,000 html reports every week night.

Here is my problem: The queries seem to run a little slower on asp.net and I do not seem to have the same type of builtin tools in asp.net as I do in CFMX.

Lets start with just a few basics:
1. is there a query.recordcount variable for asp.net?
2. is there a query.currentrow variable for asp.net?
3. Can I re-read a curent query and reference a record by RRN or do i have to re-run a query each time and dump the result into an array?
4. Someone show me how to get asp.net to match CFMX's query speed?
Every test I run has CFMX winning every time.

thanks

kes
all'n all
webweaver6


Joined: 30 Jan 2004
Posts: 101
Location: Grayslake, IL
Reply with quote
found my answers in the "other" forum. Wink

The queries will run faster in asp.net on sqlserver so long as you use the sql namespace and not the DSN namespace.
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
so thats like saying if u code your cfm queries right instead of the way u have them currently, they will then run faster than .net

must compare apples to apples
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1031
Location: Felton, Delaware
Reply with quote
And what way would you have the "querystring" to be able to compare apples to apples? Code sample?
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
The queries will run faster in asp.net on sqlserver so long as you use the sql namespace and not the DSN namespace.



if hes gunna comapre that (which i assume is the optimized way but as u know i stay away from the microsoft crap) the he should run the cfm code in a cfc and properly use cfqueryparam in the variables in the query.

if u dont know bout cfqueryparam reaad
http://tutorial138.easycfm.com/


an example of it done somewhat properly in a cfc

<cfcomponent>
<cffunction name="getDetails" access="public" returntype="query" output="false" hint="chosen listings details">
<cfset var qLD = "">
<!--- set site dsn connection --->
<cfset dsn = "whatever">
<cfset un = "whoever">
<cfset pw = "havenoidea">
<cfquery name="qLD" datasource="#dsn#" username="#un#" password="#pw#">
SELECT *
FROM listings
WHERE listingID = <cfqueryparam value="#URL.listingID#" cfsqltype="cf_sql_integer">
</cfquery>
<cfreturn qLD>
</cffunction>
</cfcomponent>

then create an object of it in application.cfm
such as

<cfobject name="listingDetails" component="components.listingDetail">

then call it in the template

<cfinvoke
component="#agetDetails#"
method="getDetails"
returnvariable="qLD">
</cfinvoke>
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1031
Location: Felton, Delaware
Reply with quote
Well... you are the CF man. I didn't know about that. I'll have to compare sometime. And the whole reason that things were compared is because she is converting an app to .NET. Otherwise comparing technologies is usually like discussing politics/religeon, and I steer clear.
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
i guess i was just more curious why they were switching but saying cfm was actually faster, read it in a breeze but its something i see a lot of ppl dont know. And thats mostly due to the books and stuff dont actually tell u about stuff like that, which is nuts.
byron
Forum Admin

Joined: 07 Mar 2004
Posts: 160
Location: Newark, DE, USA
Reply with quote
When it comes to different technologies, I say use what is best for your application/business model. We are now doing things in .NET that CF just can't do as well at this point.
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1031
Location: Felton, Delaware
Reply with quote
That's the sole reason that I started .NET in the brand new v1.0 days (I began the same week 1.0 was released). I was working for a real estate company that was consolidating resources in-house. They wanted to be able to better manage things through a common interface, and still be able to manager certain aspects of the servers (user management, file/folders and the structure, user permissions on the files/folders, as well as specific performance monitors and what not) through the same web-driven interface.

Since then, I must say I've concentrated on .NET to the point where I've become a bit rusty in CF. There were many other benefits, like the reliability of the service itself (CF needs to be restarted FREQUENTLY) and all of the Native functions supported. The API surrounding .NET is remarkable.

I'm very interested in getting my hands on Mono, but just haven't had the time. Someday soon though. I got a Suse box sitting at home just waiting to be deflowered w/ Mono Wink

And there are LOTS of undocumented functions of ASP.NET or things that people just couldn't do before so they assume that you can't do it now which is just not the case. Basically, because of the way the architecture is utilized you can do ANYTHING via the framework. A N Y T H I N G. It's pretty much left to "What do you want to do?". Personally, I think it's great. And it's saved me LOADS of time because to do anything you're basically calling a prewritten class or API... *happy*.
byron
Forum Admin

Joined: 07 Mar 2004
Posts: 160
Location: Newark, DE, USA
Reply with quote
I agree .NET over VB and asp of old, really kicks. Think I'm wondering is if the new atlanta .net version of CF allows you to access the .NET framework objects from your CF code. IE createObject(".NET"), now that would be way too cool.
Josh
Forum Regular

Joined: 01 Apr 2004
Posts: 1031
Location: Felton, Delaware
Reply with quote
I was thinking the same thing. If you could interop the two technologies very easily and aquire the strenghts of both as well as being able to more easily integrate them that would be a SERIOUS benefit.
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
and it is true that somethings are better suited for diff technologies, however from what i have seen its also very depenedant on what the programmer can do.
personally, .net dont float my boat & i'll admit a lot of it is because of my serious hate of M$ and i dont need to use it so i choose to support a company who supports the web & not just themselfs. Plus when there is a problem it gets fix fast not like m$'s current .net problem which they say will take 6 months, thats just insane.
luckly, i get to pick and choose my clients so i am not in the same boat as most.

On our cf board the other day they supposedly had the classic example of when using .net would be better than cfm. was renaming hundreds of thousands of files and so forth & the ppl agreed yeah use .net for what they were doing, then a tech head came in with a hot rod cfm script that still smoked it. So its more in the hands of a developer.

and for josh, im a partner in a real estate company and when i was actively selling re i was a top producer in re every year so i do know al ot about it. and that was one of the main reason i went with cfm after asp.
there really is nothing that cfm cant do better for those types of sites faster than anything else. But everyone is so inclined to tap into say realtor.com (who still uses asp, slow, slow, slow) and thats fine, let them do it. Its just bad business model too follow, but everyone follows it which is great for me Smile

anyways, a couple of us are converting the new flashblog www.flashblog.org from php to cfm so i gotta get back to it
Competition: survival of the fittest!
webweaver6


Joined: 30 Jan 2004
Posts: 101
Location: Grayslake, IL
Reply with quote
This posting turned out to be much more than i expected. I've programmed CF since 95/96 and some of my apps from that time are still running without change. However some of my newer apps are VERY process intensive. The current one is a stock analysis system and it runs ok on CF, except when i need to do data corretions. This is where the query execution time is the bottle neck. I have to run a few thousand queries and a few seconds on each really make a difference. Another thing that is leading me to use .net for some, not all, of the work is that it feels more like C++ and VB in terms of style. For displaying large amounts of data CF seems to be a bit faster. I could be using C++, and I may have to, but i like pushing web tech to it's limits. So far i've been very plesently supprised over the years!

I guess i'm a diehard CF'er who wants CF to do everything, but I have to defer to byron when he said, "use what is best for your app". In the long term I believe Allaire will continue to push CF to better compete with other technologies, but for now Wink

thanks
kes
loftboy
Forum Regular

Joined: 24 Jun 2004
Posts: 1129
Location: Colorado
Reply with quote
well allaire hasnt owned coldfusion for quite sometime now. What version of coldfusion are u running?

really there arent any limits to cfm now that its a java compiler and that u can run jsp tags in cfm and it running on a j2ee platform. Have u tried any of that yet?
What can I say....?
webweaver6


Joined: 30 Jan 2004
Posts: 101
Location: Grayslake, IL
Reply with quote
CFMX (latest version). I still can't break the habit of saying Allaire!! Embarassed Yes I've tried a few things, I'm using ther Ent. Version which allows for multi servers. Not a bad thing so long as you have the horsepower.
ASP.NET vs CFMX
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 2  

  
  
 Reply to topic