Developing a ASPX Ajax site

koeks

Expert Member
Joined
Oct 21, 2008
Messages
1,566
Reaction score
3
Hi people... I'm going to be developing an ASPX Ajax site. what's the quickest way to go about the whole thing. I have the database already...

Code generators, etc...

anyone can share a useful code generator that i can use...
 
Code generator? Damn man ... all you have to do is drag stuff onto the form inside an ajax control, add validators and then buttons.
It takes less time than configuring a code generator will take.
 
trust me code generators can work like a charm. the only thing is that some are very hard to work with... i have one that generates every thing, from the db script to the front end...
 
ASP.NET MVC? Not much experience yet, sorry...

What type of "code generator" are you looking for? One to generate the stored procedures, classes and DB interface for you?
 
ASP.NET MVC? Not much experience yet, sorry...

What type of "code generator" are you looking for? One to generate the stored procedures, classes and DB interface for you?

yes ASP.net MVC. i think i will skip it for now.

I'm looking at Code Generators for The front end, stored procedures, classes and DB interface. i have one that i use it's just that it's a bit of work. but i will continue with it.
 
asp.net mvc is not yet mature enough to be used as a production site, if you are going the mvc pattern route. The best language would be either ruby(prefered) or python(django) and php. Personally i believe ruby is awesome some dont agree, they havnt used it enough. Django takes alot of its principals from the ruby framework to make it compatible with python.

code generators are stupid to use, you can easily write your own DAL layer, using the simple CRUD methodologies. Code generators usually populate the logic of the application with unused bloated code blocks, which slow the application down, if it is going to be a constantantly accessed one should never use a code generator.
 
Last edited:
yes ASP.net MVC. i think i will skip it for now.

I'm looking at Code Generators for The front end, stored procedures, classes and DB interface. i have one that i use it's just that it's a bit of work. but i will continue with it.

Stored procedures are not good for web development. To many database calls, will cause overhead, the best method for web apps is to build the sql dynamically through some sort of interpretation layer.
 
code generators are stupid to use, you can easily write your own DAL layer, using the simple CRUD methodologies. Code generators usually populate the logic of the application with unused bloated code blocks, which slow the application down, if it is going to be a constantantly accessed one should never use a code generator.

+1 gazillion.

I am not in the least a fan of "code generators". With a bit of effort and a little time, you can build something much more powerful and efficient than what the so-called "code generator" created for you. Rather do everything on your own instead of wasting time in generating, modifying and then eventually scrapping the generated code.
 
+1 gazillion.

I am not in the least a fan of "code generators". With a bit of effort and a little time, you can build something much more powerful and efficient than what the so-called "code generator" created for you. Rather do everything on your own instead of wasting time in generating, modifying and then eventually scrapping the generated code.

Is it a different story if you write the generator yourself to your standards and you know what is going on with the internals of the logic. Then i dont have a problem with it.
 
Is it a different story if you write the generator yourself to your standards and you know what is going on with the internals of the logic. Then i dont have a problem with it.

The only place where it might be useful is in deriving stored procedures / classes / data adapters from the database structure. But generating business logic or (usable) user interfaces?
 
The only place where it might be useful is in deriving stored procedures / classes / data adapters from the database structure. But generating business logic or (usable) user interfaces?

like i said before i hate stored procedures, and i feel exactly the same with views. BL should represent any sort of data struct in memory. logic is processed alot faster in memory than it would be on the server.
 
Stored procedures are not good for web development. To many database calls, will cause overhead, the best method for web apps is to build the sql dynamically through some sort of interpretation layer.

can you elaborate more...
 
Well the layer would decide what you are trying todo obviously with the methods being passed in or with certain properties

e.g.

ReturnSql(object o, list<params> i)

the object would contain something like User.Branches,

thus the layer could extrapolate that you are intending to query the User_Branches table
the params list would just be a generic collection with accompanying fields.e.g

(int)Userid=>1
(string)branchName=>JHB

so when you explode the collection the query would be output someting like select * from user_branches where userid=1 and branchName='JHB'. Obviously this a very primitive example, but i think you kind of get my point. I have written libraries that do what i am explaining. And i have done benchmarks with similar stored procedures , and the dynamic was at least 0.3 seconds faster, so if you have about 3,000 requests a second you can see that builds into like 30seconds of delay time that the server processes. But when i wrote it i was looking at about 14,000 requests a second. As that is what our website is looking at handling, most likely more.

Also i might point out here, that the microsoft ajax controls are horribly slow. Personally i dont think that asp.net is the best of enviroments to make websites, yes its quick, its easy, and there are some sites that do it, but its just slow. take www.asp.net and www.codeplex.com, those sites are just horrid. They take forever to load. My internet is quick. Other sites written in faster processing languages such as ruby and php are faster. freshmeat, sourceforge(which has vasts more traffic) loads much much faster than those.
 
Last edited:
Well the layer would decide what you are trying todo obviously with the methods being passed in or with certain properties

e.g.

ReturnSql(object o, list<params> i)

the object would contain something like User.Branches,

thus the layer could extrapolate that you are intending to query the User_Branches table
the params list would just be a generic collection with accompanying fields.e.g

(int)Userid=>1
(string)branchName=>JHB

so when you explode the collection the query would be output someting like select * from user_branches where userid=1 and branchName='JHB'. Obviously this a very primitive example, but i think you kind of get my point. I have written libraries that do what i am explaining. And i have done benchmarks with similar stored procedures , and the dynamic was at least 0.3 seconds faster, so if you have about 3,000 requests a second you can see that builds into like 30seconds of delay time that the server processes. But when i wrote it i was looking at about 14,000 requests a second. As that is what our website is looking at handling, most likely more.

Also i might point out here, that the microsoft ajax controls are horribly slow. Personally i dont think that asp.net is the best of enviroments to make websites, yes its quick, its easy, and there are some sites that do it, but its just slow. take www.asp.net and www.codeplex.com, those sites are just horrid. They take forever to load. My internet is quick. Other sites written in faster processing languages such as ruby and php are faster. freshmeat, sourceforge(which has vasts more traffic) loads much much faster than those.

I have to disagree with you on Stored Procedures. When you create a stored procedure in the database, the query path is cached on the SQL Server, while "dynamic queries" have to recalculate the execution path every time they are called. If you design your database by effectively utilizing views, stored procedures and dynamically created SQL (executed in a stored procedure via sp_ExecuteSql) you can attain a very fast data-layer. By just changing a few table joins or building a view or 2 upon one another, we were able to shave off at least 5 seconds off the execution time of some (very complex) queries on huge datasets.

Also, I compared CodePlex and SourceForge just now. CodePlex opened up within 2 seconds. I waited more than 8 seconds for SourceForge to open up...
 
I have to disagree with you on Stored Procedures. When you create a stored procedure in the database, the query path is cached on the SQL Server, while "dynamic queries" have to recalculate the execution path every time they are called. If you design your database by effectively utilizing views, stored procedures and dynamically created SQL (executed in a stored procedure via sp_ExecuteSql) you can attain a very fast data-layer. By just changing a few table joins or building a view or 2 upon one another, we were able to shave off at least 5 seconds off the execution time of some (very complex) queries on huge datasets.

Also, I compared CodePlex and SourceForge just now. CodePlex opened up within 2 seconds. I waited more than 8 seconds for SourceForge to open up...

Fair enough, you had good results. But then again i have had better results with the way i do it, than with sprocs. The idea behind the logic was not having to write new queries each time i wanted to add a new table, the
layer would cater for all of that.

Your internet is pro-microsoft:P
 
Erm, @ FarligOpptreden, you have to compare apples with apples, a website can send the non-stored-procedure query to the database using :
1 - a completed SQL statement with the values already set in the sent statement. Which the optimiser will evaluate and based on the actual values in the where clause, will find the right data much quicker than a statement with @variables in it.
2 - a statement with @variables, which are then prepared to be used, exactly the same as a stored procedure would do, and these query plans ARE now chache'd .. since SQL 2000 methinks.

So, by using stored procedures, you've eliminated option 1 and the speed boost provided with hard-coded figures in the where clause.

And, when using stored procedures vs option 2, the only advantage is that the query plan is already saved for a stored procedure, instead of calculated on the fly.

I'd still go for option 1 every time a coconut.

However, option 1 and 2 does have a security risk, which stored procedures help to solve.

So .. once again .. choose the correct solution for the problem.
 
Erm, @ FarligOpptreden, you have to compare apples with apples, a website can send the non-stored-procedure query to the database using :
1 - a completed SQL statement with the values already set in the sent statement. Which the optimiser will evaluate and based on the actual values in the where clause, will find the right data much quicker than a statement with @variables in it.
2 - a statement with @variables, which are then prepared to be used, exactly the same as a stored procedure would do, and these query plans ARE now chache'd .. since SQL 2000 methinks.

1 - By constructing the queries in the Stored Procedure and executing them via sp_ExecuteSql, you execute a structured query (SQL, hey :p) without @variables in, with explicit values assigned to the clauses and or ordering. I believe in a philosophy of managing as much as possible on the database, thereby reducing the areas re maintenance. It's much quicker to fix a single stored procedure in the database, than it is to fix a query compilation error in your BL layer, compile the whole thing, obfuscate the code and deploying it on the necessary servers.

2 - Fair enough, but you win nothing over Stored Procedures then (except perhaps a maintenance burden).
 
Top
Sign up to the MyBroadband newsletter
X