开发者

Leading the jump from Classic ASP to ASP.NET, any advice?

I just started at a new company that has 99% of their code writ开发者_JAVA百科ten in classic ASP (most of it poorly written) and part of the reason they hired me was because I had worked with both ASP and ASP.NET in the past. The ASP.NET experience was VB.NET but I've worked with C# in college but I prefer it just because I've worked a lot with PHP in the past and when I'm not focusing I just start typing C syntax and have had many occasions here in ASP where I end lines in a semi colon just out of habit and have to go back and delete it.

But I digress, basically I just don't have the knowledge I need to make the best decisions on things have made notes of some key processes that I'd like advice on:

  • Version Control - truth be told I've never really used it. On my own I just never had that whoops moment to push me to use it and shops I've worked in have always just thrown caution to the wind. Would like to know what you all think I should use as far as the server side and
  • Local Dev Environment - Probably something I'll just quickly Google but I want to setup a local dev environment so I can test stuff without having to FTP it somewhere first.

  • Pushing Changes Live - I've never really understood the step between checking something into version control and seeing it live, is there some sort of automated system that can go "hey I see you checked in, let me see what's different between this and the live version and push the affected files" – possibly just a lack of vc understanding all together: (

  • IDE - Downloading VS2010 Beta 10 now, hoping it's stable
  • MVC.NET - Easy to pickup? I always hated the whole concept of Web Forms, seemed like it didn't ultimately fit the Internet the rest of the world is developing.

  • Anything Else - Like I said I'm relatively new to this stack so I'd love any advice I can get early on to avoid any "shit, I wish I knew that 3 months ago" moments.


Version Control:

Definately have a look at SubVersion, its free, we use a paid-for hosted service called Assembla (www.assembla.com) but you can install the server on your network. Themost popular client is called TortoiseSVN (http://tortoisesvn.tigris.org/) its also free. You can also have a look at VisualSVN (http://www.visualsvn.com/) which integrated into the VS IDE, their site also has a handy SVN server installation.

Local Dev Environment

Local IIS or Built-in VS web-server in VS are both fine, it really down to preference I think. Opening a website (File-system based) rather than IIS based seems to work quite well for us.

Pushing Changes Live

ASP is very page by page based development and doesnt require compiling, copying files up to a test or production site is quite easy. Depending on how you compile/publish your asp.net site, you will need to consider how you compile library code and publish your web application/website.

I would recommend starting off by using SVN to commit changes and to update test/production sites.

IDE:

I would recommend updating to the latest Beta version of VS2010 and use that.

Anything else:

Consider the rollout, are you replacing everything before going live?

Consider adopting an existing framework, use an ORM, or Business Objects framework, possibly even use Code-Generation. Have a look at CodeSmith, it has various ORM/Business Object Frameworks associated with it. (these will use various teqniques and technologies in the .net framework, which you will need to learn)

Look at the basic structure of the site:

Consider asp.net WebForms (Applications) or MVC (Websites) [yes, this is a very basic analysis of the differences]

Site Membership and Permissions: Have a look at the MembershipProvider, RoleProvider and build your own.

File System: Consider how and where you will upload files.

Separate UI into re-usable UserControls.

HTH, Good Luck you have a lot to do...


Wow. lots of questions here:

Version Control - Look into Subversion and Git. They represent two kinds of version control, you might like one more than the other. Git is free for open source projects.

Local Dev Environment - I would recommend using the built-in web server in Visual Studio. You can right-click a page in your solution explorer and say "view in browser". Then it will just compile it right there and open up an instance of the local web server.

Pushing Changes Live - I am not gonna offer advice here. Someone smarter than me will surely do so.

IDE - Yeah, just stick with the current version of Visual Studio. If you don't have any active (for pay) projects, I think the VS2010 is a good idea because it supports the newest upcoming features of asp.net and by the time you learn them, it will probably be released to the public anyways.

Anything Else - It's worthwhile (from getting work perspective) to know WebForms in and out. But I would highly suggest learning ASp.Net MVC (if, for no other reason than, "it's more fun").

After reading Mark Redman's answer, it triggered something for me. I would recommend (as he does) that you investigate some sort of ORM. I use SubSonic and really love it. Bu t there are lots of options out there.

Those are my 2 cents.


I'm going to focus on versioning and project tracking here. Development environments for ASP.Net are well documented.

  • Version Control - I use SVN (version control) with Tortoise SVN (windows client integration) and Trac (project tracking). SVN and Trac both run on Apache (a web server).
  • Pushing Changes Live - Commit your changes to SVN from your dev machine, do a SVN update on your test site to pull down the latest changes from the repository, run tests, then do a SVN update on your production site.
  • Anything Else - In this scheme Apache, Subversion, and Trac will be running on a server that is NOT your development machine and hopefully (but not necessarily) also not the same server that is running your production IIS.

Check out: Apache HTTP server: http://httpd.apache.org/ Subversion: http://subversion.apache.org/ Tortoise SVN: http://tortoisesvn.tigris.org/ Trac: http://trac.edgewall.org/


One thing to take account of is basically going from Classical ASP to ASP.NET is about as similar as going from COBOL to ASP.NET. Everything will basically need to be a complete rewrite (especially as you said there were poor development practices in the original codebase)

Version Control: Definitely use it, there's also Team Foundation Server which if you can convince the company in the value of purchasing you a MSDN subscription TFS is included at no additional cost for 5 or less users.

Pushing changes live: I currently use Web Deployment projects (not sure if they're compatible with VS2010), TFS is also a build server I just haven't had time to setup the responsibility for that. If you take advantage of TFS fully I'd also recommend looking into a continuous integration (CI) tool something along the lines of Jetbrains's TeamCity or CruiseControl etc.

Local Dev Enviroment: Get Jetbrains's Resharper! This is the number one most important tool to developing software in .NET second only to Visual Studio itself!

Anything else: Learn generics and lambdas/expression trees both are integral to proper software development in .NET and both are moderately to extremely complex topics (IMO).


Version control: I see many recomendations of SVN here but... it's just outdated. Use GIT or Mercurial. They merge algorithms are more robust. The are faster and safere because they are distributed. They are more flexible - you can construct a workflow model that suits your company well while there is basically one way of using SVN.

Pushing changes live: After you have version control, the next thing to do is making a Continous Integration server thah repeatedly checks out repository and perform automated build. You can get immediate information who and where made an error. You can make this build do anytking you want: perform static code analysis, unit tests, deployment. You can make several builds - one, automatic, that builds a project and deploys it to a testing environment. And another one, triggered manually, that will deploy to live. I worked with Hudson, Jenkins, CruiseControl.NET, TeamCity and I've found TeamCity to be the most user friendly tool of that four.

Local dev env: Althoug IIS Express (that Visual Studio built-in) is OK in many cases, you have to know where it differs from the 'real' one. I would just recommend using the full IIS 7.

IDE: Visual Studio + Resharper + Notepad++ + LINQPad.

Anything else: Have some bug tracking/planning software. Even as simple as http://www.trello.com, but use it. My favourite is http://www.pivotaltracker.com

Introduce code review into the workflow. http://www.reviewboard.org might help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜