by iamelgringo · 19y ago · 0 comments
[non-flame-bait personal opinion]
And, I have to say that I came to a strong dislike for ASP.net. In fact I was carrying a 4.0 until this ASP.NET project. I disliked it so much, I didn't finish the project. Perhaps if I spent more time on it, It might fit a little better, but from what I"ve seen, I hate it mightily.
The benefits:
It works well with IIS and the Microsoft Server stack. If that's what you know, stick with it. You'll spend months learning unix shell commands, and file structure, and how to install things, etc... I'm more of a unix guy and prefer to develop with unix on the server side. If that's not your cup of tea, then stay on the Microsoft side of life.
The cons:
I also didn't like the idea of ASP.NET pages. I found it really combuersone to code all the labels in the body of the <script> tags, and then output them at the bottom in the html. I simply found it really hard to get my mind around the ASP.NET way. I really didn't want to understand the ASP.NET way, I guess. I don't like how it handles SQL queries. I found it burdensome and cumbersome to write 5-6 lines of code on every page that access the database, to set the SQL query to a variable, execute the query. put the SQL query into a reader, then transfer the reader to another variable that's usable. Too long, clanky, too long. And, doing that for every page you're working on: BOORRRIIIINnnnggg! :)
Disclaimer
I was just starting out with ASP.NET, and I'm sure there's tips and tricks that would speed development up, and I'm sure I went about things all wrong. It's just that Rails really spoiled me this past summer. with the MVC model. Set up database connections once, access what you need through active record. Variables are there for you in the controller. Spit them out and format them in your views. It's like Ron Popeil says about his rotisserie: You set it and forget it!
[/non-flame-bait personal opinion]
The problem isn't ASP.NET: it's probably the way you were taught how to use it. The Microsoft tools do so much crap that it's like being put into a room full of levers and knobs with cryptic labels on them. Hard to know where to start or how to make things work.
Sit down with somebody who is using one of the automated DALs (like NetTiers, NHibernate, CSLA, etc) and knows what the heck they are doing. You'll find it very intuitive and the speed of development can keep pace (or surpass, depending on the domain) any other kind of web development.
Now for the BUT part. BUT you have to be doing straight-forward business development. Stuff in the middle of the road. Writing a check. Checking your email. Posting a message.Viewing your box scores. Etc. If you want something like an animated dancing baby that does different dances depending on your current stock portfolio and can sing out your RSS feeds in different languages, you're back to basics, and all that abstraction is going to get in your way big time. Also, if you want to scale up to 100K users quickly you're going to be learning a lot more about tweaking IIS and ASP.NET than you probably wanted. But for a lot of stuff, it's just fine. Not everybody is writing the next YouTube, and you can't beat the libraries available to you over on the "dark" side.(grin)
There's a wide gap between where ASP.NET's usefulness ends and where the really fancy stuff begins.
And yes, you totally can beat the libraries available on the "Dark Side." You'd have to try hard not to.
It all boils down to what you are doing. Lots of shops can have 3 or 4 coders doing the mainline stuff and 1 guy who can do the tricky stuff. It's an effective use of lower-skilled programming resources.
I'd have to disagree with you on the libraries. While I'm sure there are some good libraries out there, when I'm plugged into VS I've got some kazillion or so things I can do without having to Google, link, recompile, or do squat. And I can easily make libraries to share with others. It depends on your needs. Since MS does a little bit of everything for everybody, the libraries are probably the broadest that are easily available.
Hey! How did you find out about my startup idea?
Of course, you're free to use a chicken.
Oh come on, this applies for ANY tool in ANY domain. This is non-information.
But I have to agree with you, it's not that straightforward to understand ASP.NET esp if you have previous knowledge of developing web-app because ASP.NET tries to abstract everything out for you (via their Controls, ViewState etc).
On the other side, ASP.NET might not be discipline in terms of MVC but then again it is ridiculously easy to re-create a GridView such that I don't care much about the VC part of the MVC. I write less code thanks to Visual Web Developer tool.
And, I think that you hit the nail on the head about abstracting everything out for me. In the short ammount of time, I just couldn't grokk it, but I knew I didn't like it.
It seemed like ASP.NET was a purposefull movement away from typical web development. And, I'm sure that Microsoft was trying to fix problems that they say with typical web dev.
I just think that there are better solutions out there than ASP.NET. But, if you're a windows guy and used to coding in Visual Studio, and you can already use the languages that you are used to, it might be a really good idea.
Have you tried Data Access Application Blocks? We use them and we only need 1 line of code to read the database.
SqlHelper.ExecuteReader(strConnTxt, CommandType.Text, strSql);
Alternatively, you can use SqlHelper.ExecuteDataset.
We also use Code Generation software that builds all the CRUD methods automatically.
I can understand what would bring you to using a code generator, but the examples I have seen in practice are not good. I think code generators show there is something fundamentally wrong with the language/framework.
Here is what I meant: When a commercial application becomes popular to generate large amounts of code to do a small amount of work, like some CRUD, I personally feel that shows a flaw in the fundamental way the language works. The language should either be able to offer you a better way of doing it yourself, or writing a small framework for yourself. If neither of these are viable options, I would consider that a serious knock against the language.
MVC for asp.net is on the way btw.