Live data from Hacker News

Ask HN: Inheriting a large ASP.NET app, what would you do.

news.ycombinator.com

1–10 of 16 posts

Ask HN: Inheriting a large ASP.NET app, what would you do.

#1
tl;dr:New CTO, dump asp.net for bootstrap + RESTful API? I'm a consultant, and I'm charged with completing development on a large asp.net web application. It's about 25-50% of the way to being complete thanks to the previous devs who abandoned the project.  I have full creative control of the project, so I am faced with a conundrum: If I stick with asp.net, I'll likely end up rewriting the app in place.  The developers abondoned the project for a reason. They followed OO to the point of making a huge and hard to manage code base with hundreds of classes that need to be finished. Should I trudge on and finish this? I ask because I gave the client a substantial discount on my services for an equity stake in the company, and we have already made plans for extensions to my contract to deliver peripheral apps and additional features once the web app is delivered.  My instincts are: Put all the functionalities into an API, Call the api from a new web app, possibly using bootstrap. When phase 2 comes around, call API from native apps.

Or I could just stick with asp.net and have no jumpstart come phase 2, but it just seems so inefficient. Can I get some feedback as to what you would do in this situation?

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#2
So much of this depends on context, some of which you provided. What is your comfort level with these technologies? What would your effective rate be for each of the scenarios? Are there components or databases (sql server) that make particular tech choices more sensible? How much time to tear down and start anew? What pressures or deadlines are you facing from the business?

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#4
post #2

So much of this depends on context, some of which you provided. What is your comfort level with these technologies? What would your effective rate be for each of the scenarios? Are there components or databases (sql server) that make particular tech choices more sensible? How much time to tear down and start anew? What pressures or deadlines are you facing from the business?

I have a lot of flexibility. I am equally comfortable finishing up in c#/asp.net or starting over with bootstrap.  I have a contract for a certain amount of money+equity to deliver a working web app, and then we are back to the negotions table where my next proposal will be for the mobile apps.  As for sql server, i think cassandra, mongo, redis, will work just as well. I'm considering using the c# to js compiler currently mentioned on the front page to serve my api to reuse some of the work that has been done. Time constraints aren't anything to worry about, and it would take me an equal amount of time to restart or flesh out the asp.net app.

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#5
If you're estimating it's 25-50% done, then it's almost certainly 25% done or less, counting the rewriting/restructuring. Just pick how you would write it if you were doing it from scratch. Honestly. Really. Whenever I've been wrong about this kind of thing, it's been on the side of hating to throw away work already done. Anything good in the existing code, you can look at it and take. But really, just begin from scratch.

I wish I would stress this more. Do it right, the way you know how.

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#6
You might want to look into Backbone.js (or Ember.js or Angular.js) rather than Bootstrap for talking to APIs.

Also, you haven't said if the existing code is WebForms or MVC (and the fact that you haven't makes it seem like you may struggle to finish the server side code using ASP.NET).

Which platform were you thinking you would develop the REST API on if not ASP.NET?

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#7
If I were you I would see what could be salvaged. Can you rescue a bunch of business objects, data access code, etc.?

If the code was written in a half-way competent manner, it shouldn't be too tightly coupled to ASP.NET.

If there is a substantial amount of boilerplate code already written that you don't have to rewrite, I would suggest not rewriting it.

I too would like to know what you are considering for the server-side end of things.

The nice thing about ASP.NET is you can strip it down to the absolute basics. Remember that you have complete access to the request/response model. You don't have to render HTML at all. You can deal entirely in JSON if you are looking to build this into an API.

You don't necessarily need to rewrite all the components. If it's possible, hammer and chisel the existing code into something that's not so dependent on ASP.NET (e.g. move code out of .aspx/.ascx components). You can build a web app and an API at the same time, especially if you treat ASP.NET simply as a presentation layer.

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#8
post #6

You might want to look into Backbone.js (or Ember.js or Angular.js) rather than Bootstrap for talking to APIs. Also, you haven't said if the existing code is WebForms or MVC (and the fact that you haven't makes it seem like you may struggle to finish the server side code using ASP.NET). Which platform were you thinking you would develop the REST API on if not ASP.NET?

Asp.net webforms, I ought to have clarified that. The REST API i'll create with javascript, perhaps using this c# to javascript compiler: http://www.erik-kallen.se/blog/saltarelle-open-source-c-to-j... to reuse some of the c# once I decouple the objects from the user interface/data. The problem with the code right now is application logic is mixed with the data and display logic. I feel like I can add more value by removing dependencies for asp.net/mssql and trading them for free/open source software. My concerns are: Build it to scale as cheaply as possible. Make it so I can add functionality to the web/native apps by adding new services to the api, to stay dry. Stay flexible for future iterations/pivots. At some point windows/ios versions will come up, so I'm just trying to excersize some economy of motion here. If I create wcf services, we will have to purchase visual studio licenses when we start hiring developers to maintain them.

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#9
post #5

If you're estimating it's 25-50% done, then it's almost certainly 25% done or less, counting the rewriting/restructuring. Just pick how you would write it if you were doing it from scratch. Honestly. Really. Whenever I've been wrong about this kind of thing, it's been on the side of hating to throw away work already done. Anything good in the existing code, you can look at it and take. But really, just begin from scr…

The right way in my mind is to start over with bootstrap and make this something I can grok. 100's of aspx files are not the way to make this app. Too much premature complexity.

Re: Ask HN: Inheriting a large ASP.NET app, what would you do.

#10
post #7

If I were you I would see what could be salvaged. Can you rescue a bunch of business objects, data access code, etc.? If the code was written in a half-way competent manner, it shouldn't be too tightly coupled to ASP.NET. If there is a substantial amount of boilerplate code already written that you don't have to rewrite, I would suggest not rewriting it. I too would like to know what you are considering for the serve…

Server Side: I plan to copy those that scaled before me, a mixmash of: pinterest http://highscalability.com/blog/2012/5/21/pinterest-architec... , reddit: http://kev.inburke.com/kevin/reddits-database-has-two-tables... , and instagram: http://highscalability.com/blog/2012/4/16/instagram-architec... architectures.

The previous devs managed to get everything tightly coupled at the design stage, which is why I think their implementation efforts failed.

The plan for now is to seperate the existing code into layers and decide what to do from there.

Post reply on HN