View Full Version : Any .NET developers here?
Anyone here doing lots of ASP.NET development? I've been thinking a lot recently about my development process and the tools I use in preparation for my next project and would like a second opinion...
I'm a .NET developer. C# mainly though.. not ASP.
ASP is strictly web programming correct?
Monolyth
10-26-06, 12:13 PM
VB.NET, ASP.NET (VB codebehind), and some C#.
I primarily use Visual Studio.NET for my work, and additionally vbCommenter (xml code comments), nUnit (Unit testing), nDoc (technical documentation works in-tangent with vbCommenter).
Also if you can get your hands on Application Vantage from Compuware...wow what a great application to measure application/network performance.
thor1182
10-26-06, 12:36 PM
O.o whats your question?
Well i've been doing .NET for nearly 3 years. Until now I used Visual Studio 2003. I have VS 2005 but haven't done a full project in it yet. For my next project I will be using .NET 2.0 and probably Atlas. I write primarily in C# now. I use nUnit and WatiN (.net version of Watir) for unit tests, nAnt for compiling, and subversion for change control. I've been thinking a lot about the way I code and theres things im not happy with:
1) With every new project I do the same stupid initial crap, creating tables, writing all the CRUD stored procedures, making a home page, login page, menu page of some sort, administration site. It seems very repetative and im tired of it.
2) I have this one PM I do freelance work for and he likes to change the design of a system many times, even after its done and live. I have also been unable to convince him of the benefits of refactoring. He also doesn't believe in spending time (money) on testing. So my code rots and becomes increasing difficult to maintain. I have little confidence in my code and I cringe everytime he asks for major changes.
3) I'm having doubts about Visual Studio. VS 2003 has some annoyances like how when you change the name of a webcontrol and the IDE spazs out for several minutes. Or how it totally molests your nice neat HTML. VS 2003 also isn't really suited to .NET 2, so that means moving to 2005. But I've heard and read bad things about 2005 too, like it being slow, having a huge memory footprint, and nasty stories of corrupt solutions, 100% CPU usage, crashes and lost work. This is crap! an IDE should help you be more productive, not get in the way. You should be able to trust your tools.
My thoughts are as follows:
I want to set up a template web app. Something with MSSQL connectivity, a basic homepage, user authentication etc. When I start a new project I just want to be able to copy the template project, then use grep to replace every instance of the word "TemplateApp" with "[my app name]" and bam have a functioning app ready. I've also been writing codesmith templates to generate the initial sprocs, mappers, business objects and unit tests.
I really want to get into the habit of making more unit tests but its not a discipline I have been able to get myself into yet. Unit tests would help me be more confident in the code. Also if I write a unit test for every bug encountered, then I can be sure that in future changes old bugs don't get reintroduced. I have read about test driven development (TDD) but I can't see it actually increasing my productivity. With TDD you write the tests before the code, but so often I don't know what the code will actually do and the one PM I have will likely change his mind in the middle of it anyway, so any unit tests I write upfront will likely become invalid and need thrown away.
To make my code easier to maintain I want to break it down more into seperate DLLs. Until recently, everything I did in Visual Studio ended up being just one big DLL. This is bad. I want seperate DLLs for each architecture layer. For example if the app gets ported from SQL Server to SQL Lite, I should just need to replace the DataMapper DLL. If I need to write a Windows based administration tool, I should be able to use the same business and data mapper layer and just replace the interface DLL.
I also want to automate more of my build process. Im creating a script that will compile, deploy locally, run unit tests and commit to subversion if they succeed. I also want to write another script that I can use at the end of the week to FTP the app to the testing server and use comments from the subversion log to create an invoice to send to the client.
Yes, I want to automate lots. My goal is to get to the point where I can just run a script file and then bill the client for 8 hours work >:D
Now im wondering how all this is going to work when using Visual Studio 2005. I don't like the way it handles projects e.g. putting the solutions in one directory, but the websites in another, whats up with that? I want the webpages and the rest of the code to be subdirectories of the same folder which is the projects name. I've also seen odd behavior with it loosing references to other DLLs compiled as part of the solution. Lately ive been working a lot more in the command line. When it comes to maintaining existing code im just using Notepad++ most of the time. So for my next project should I just give up on VS and start from scratch with Notepad++? The only thing I will miss will be intellisense. It is a real time saver and much more useful than the simple keyword and dictionary completion that Notepad has. Other VS features like the visual designer I never use anyway. But intellisense man... its hard to let go of.
Monolyth
10-26-06, 03:48 PM
I tend to mix TDD into almost every project I work on (regardless of what the 'client' says). It ensures that I know what I want to happen, and how I want it to happen. It was pretty hard to get out of the common 'I need to code before I know how it will work' mindset. But after awhile I found that I could easily streamline everything I was going to do in the application before I ever wrote it, and when it came time to actually write the code I knew exactly how I wanted the code to react.
Even if a client doesn't want to test an application, keep in mind they will be even more angry if you release a product and a serious bug exists in it and they want you to come fix a production release. Even if you told them that testing was necessary before release they will be more angry than if you had presented your project plan with testing time integrated into it.
I like VS 2003, I am very comfortable in it, and I am about to start a major recoding effort in C# using VS 2005 & .NET 2.0, we'll see how it goes. I too have heard some horror stories about VS 2005, here's hoping.
thor1182
10-26-06, 03:53 PM
Some thoughts:
1. Yes VS 2005 is a bit of a beast, but if you saw the advantages it and 2.0 have over VS 2003, you'll wonder why you didn't switch sooner.
2. 2.0 has a lot of built in controls that can do a lot of what you are saying you want to do done, so all you have to do is drag them on to the page and wire them up. I would suggest you read up on the new features of ASP.NET 2.0 to try and get a better grasp of what they are and how to use them.
3. Any web control that you find yourself using a lot, make a custom server control for it. I would also suggestion make this its own project so you can port it from project to project just from dragging it from your tool bar, and it will do all the include work. For me, one of my first ones I did was an authentication control that authenticated against the active directory @ the university.
4. There are ORM tools out there that will look at a DB schema and generate your DA and business layers in seconds. The one I use @ work is called LLBLGen Pro. What used to take weeks of proc generation and data object writing is all done for me.:D
Monolyth
10-26-06, 04:02 PM
/me hugs custom controls...
I love you custom controls...yes i do...oh sorry.
Yes, I've made a few custom controls before. Its definately something I should do of though... I could probably spend a few days just writing a control library.
Even if a client doesn't want to test an application, keep in mind they will be even more angry if you release a product and a serious bug exists in it and they want you to come fix a production release. Even if you told them that testing was necessary before release they will be more angry than if you had presented your project plan with testing time integrated into it.
True of almost every PM, but not this one. He's quite ... unique. The project I am working on for him I have been working on for 2 years now. He has his own company and this is like his own pet project. Although he sometimes complains he is out of money, he seems to have an endless supply of it... though I don't know from where. He complained he "blew his budget" on the project and that was last December and hes still going. Its funny how he can't afford to pay me to spend time refactoring code or writing unit tests but he'll have me work for months on a new features 99% of users will never use. The project has been subject to major feature creep. The code is a huge hack-job and I would be embarassed to show you guys any of it. A lot of it certainly belongs on TheDailyWTF.com :)
At some point I will be starting another project for him so im seeking an application architecture and development process that can withstand a LOT of scope and feature creep and also sneak in some extra testing into the process. Maybe TDD is the way to go. I just know I'm going to have to really flog myself to adopt it.
1. Yes VS 2005 is a bit of a beast, but if you saw the advantages it and 2.0 have over VS 2003, you'll wonder why you didn't switch sooner.
I agree, theres lots of good stuff in .NET 2.0, generics alone are a big time saver for me. Though I want to consider the framework and IDE as two seperate things. I'm definately going to 2.0 for all my new projects. I'm just undecided about VS 2005.
There are ORM tools out there that will look at a DB schema and generate your DA and business layers in seconds. The one I use @ work is called LLBLGen Pro. What used to take weeks of proc generation and data object writing is all done for me.:D
I heard of LLBLGen but not used it. How does it compare to Codesmith? How long does it take to learn? I've got about 2 weeks before my next project starts.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.