Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What I am doing
I am trying to migrate Classic Asp app to ASP.NET MVC. Classic App was written for 15 years. There are no chance to write new project and migrate all code at one moment. Business app must work 24/7.
What solutions I have found
I did not find any good solution. One advice I have found starts with words "I feel your pain, bro". Business can not give such human resources for global refactoring. So the only way I found is to write some kind of proxy using WebClient.
Architecture
I have server with IIS that hosts Classic ASP app. I will add MVC app near it. Every request received by server will be managed by MVC project. If there is action that request asks - MVC app will work as normal. Render view, return to client. If there is no such action Controller will call Classic ASP by using HandleUnknownAction method.
So it will do some work by processing url and cookies and in the end call Classic Asp app by WebClient.DownloadString(). The return string (HTML response) it will embed as content to the page (Headers, Footers are in MVC Layout). Need to mention - project is not highlighted but near it.
So I can migrate old code by small pieces. Action by action with no impact on application. Just by creating action methods in MVC.
Requirements
Response time will grow significantly.
There are no alternatives.
Question
I want to know every possible chance to speed up such web app. Maybe by tweaking WebClient configuration or so. Are there any settings to do this? Maybe some advices to manage webclient pool? I do not need to make cross server requests - does this open any abilities? Maybe this is the place for async calls? Or reorganize server structure?
Thanks for any advice!
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am working on a project where we already have an existing website built using Asp.Net. We are planning to add some new pages and update some existing one.
I am planning to develop those new pages in Angular 5 with Webpack. We can not convert the whole website into Angular due to budget constraint but ultimate goal is to convert in completely in Angular 5.
Have anyone worked on such a hybrid app in recent future?
Can someone please throw some light on it, whether it is workable and If there is any performance impact due to mixing up the technologies.
Yes I'm working in a similar situation, and it's definitely possible. An .NET page (MVC?) can return an Angular SPA and take control of the UI flow from that point on.
Say you want to start by creating a "User Profile" page in Angular. When the user navigates to that page in your standard MVC site, it should return the page with the Angular application loaded (as a javascript script reference). From there on, the Angular app can handle further redirects and logic.
It does make some things complicated, but it's usually not feasible to port things in one go. This approach has allowed us to move over to Angular, 1 page at a time.
We at a large company have done exactly that. It is very simple. Using angular-cli create a new project
ng new my-project
and copy the contents into the root of your existing ASP.NET solution. You will now need to use
ng build --watch
instead of
ng serve
and copy the script includes from /dist/index.html into your aspx or cshtml file.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to use Angular 4 for doing small operation like just making ajax call. Note: I know, I can use plain jquery to do this... blah... blah...
Question:
What Angular 4 Nuget Packages I need to Install for doing small operations like just making ajax call. Any example will help.
Technologies I am working with: Asp.net MVC, .Net Core, C-Sharp
This would be an inappropriate use of Angular. Angular is a client-side technology whose primary purpose is to provide a single-page application (or SPA) user interface for a Web application.
The idea is that the entire application runs on the client and does not require going back to the server to navigate between the pages of the application. The only time an Angular application needs to hit the server is to get data or to lazy load more of the application.
It makes no sense to use Angular within an MVC application to retrieve data.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm currently working (as a school project, nothing real) on a REST WebServices to handle a little chat system. The WebServices tier is done, but now I have to add an administration panel to allow users to manage their databases (conversations registered, message, etc).
I would like to know how to implement this using Angular JS.
Should I add the features needed on my WebServices, or should I create some new controller in the ASP.NET project just for this ?
Thanks in advance for your answer.
Firstly, your AngularJS project supposed to be front-end system which contains UI & logic code to make calls to web service and your webservice project (I don't know whether you choose WCF/Web API/ASMX or anything) supposed to be the back-end system which will expose some HTTP endpoints (GET/POST/PUT/DELETE) for your front-end system to call. I would suggest you to separate these two projects so that you can have clearer view about how two of them communicate with each other.
For the second part of your question, now you want to use AngularJS to call your webservice. The most common way is $http (https://docs.angularjs.org/api/ng/service/$http). Just put the code inside your event handler (button clicked or submitted) and it should be working.
$http.post('/someUrl', data, config).then(successCallback, errorCallback);
Hope it helps
You would create an html form that uses ng-model on the text fields to represent your back end models. Next you will need a controller to send those models via a service that will interact with your rest web services to persist your data. I'm actually working on several applications like this currently but they have a node.js based back end instead of .Net but the format for sending and retrieving data is json.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We are building a new Business Application using .NET technologies. First we started looking at some Javascript frameworks as we are basically converting a windows app to a web app so we thought using JS would give the same user experience as win forms.
We looked at many including Angular (no rich controls), KendoUI and WIJMO but ended up writing lots of JS and our prototype project became complicated as we used the SPA (Single page application) approach.
Is there is a way to get the simplicity of ASP.NET MVC and the great user experience of JS frameworks? Has anyone had any experience with building a Business Application? What are the recommendations?
Thanks
Yes, we use a mixture of these technologies and a simple eventing strategy for communication between the server/client
SignalR - for a persistent event pipe (transport)
Angular - DOM manipulation/data binding
Bootstrap - Great starting point.
MVC - awesome asset pipe-lining in .net, allows for the bundling of lots of js files into one, and partials allow for sane management of a very componentized page structure.
TypeScript - at scale js is very hard to maintain, refactor and debug, typescript removes an entire class of run-time errors and allows for very good code completion and refactoring tools in Visual Studio with ReSharper.
Look into Ext JS from Sencha.
Ext JS uses an MVC architecture and has a whole bunch of nice user interface widgets.
Disclaimer: I am not affiliated with Sencha in any way. My company, however, does use their framework in our applications.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Some background: We have 3 websites that are all part of a standard workflow. Each website handles a different part of the workflow.
Website 1 is for sales (pricing, sales, etc)
Website 2 is for engineers (implementation, coding, testing)
Website 3 is for reporting (used by all but primarily for administration and management)
We're gearing up to add notifications in a way that's a lot like how StackOverflow does notifications. I actually posted this on Meta Stackoverflow because that seemed like the best route, but the question didn't get very far. The notifications in our context would be things like "John Smith's timesheet is late" or "You have been assigned to a project"
Now I'm curious as to how other developers have set this up. I'm primarily worried about code repetition and maintenance at this stage.
Specifically, should each website be responsible for implementing its own notification client? That seems like it'd be really easy for code bases to get out of sync. But at the same time, even if you build a library you still need to handle the HTML templates somehow. How much duplication of functionality is acceptable? I'm at a loss here.
As you can tell, I'm not really sure where to start. If this were for a single website it'd be a different story, but implementing it across multiple websites at the same time has be puzzled.
Some miscellaneous facts about our stack:
Server side: ASP.NET MVC 4 (C#)
Cliebnt side: jQuery + Knockout
Database side: SQL Server w/ LINQ to SQL
IE not supported.
You can also do something like google +1 button. Link to a javascript common to everybody and have a custom html tag that will indicate where to put the data with configuration if needed.
Since you own all the websites, you can put everything in it's own .dll and add it to the solution of each solution.
Are you need something like Redis.io? There is Publish-subscribe in Redis.io.