I have been tasked with a project where I am to add a new application and have it within an older application (web applications). This is an internal application and management decided that they want it wrapped in this older app. The older application is a ASP.net web app using the 3.5 framework.
My original plan was to use jQuery and Web Services (using JSON and AJAX). My team-mate on the project really wants to use Entity Framework (4.0). As we may be sharing the same look and feel the data is a different database altogether.
After several attempts yesterday, we found some issues. We created a project inside the original solution that targets the 4.0 framework. I created a WebService on the project, but when I tried to call the webservice from the 3.5 project I didn't get an error but I didn't get the return string. I was watching on Firebug and did not see the GET call either.
My team-mate did a little more research and found out about the cross-domain issue and jQuery, so it seems that we are limited with the Entity Framework (3.5) and remaining on the .net Framework (3.5). We did try changing the dataType to jsonp but calling the WebService still didn't work.
However, I was wondering, really management wants the project wrapped inside this other project for consistency sake (navigation, design and so forth). Is there a way to have the 3.5 project display our code that is being generated from the 4.0 project (a totally different solution and probably a different server)? I'm thinking the way the iFrame used to work but I don't want to use an iFrame at all.
One way to solve this problem would be to stand up a WCF webservice to handle the database calls. You could develop your "data layer" with .NET 4 and EF4, then call that layer from your .NET 3.5 ASP.NET application. It's not the absolute cleanest solution, but it would allow you to get the benefits of the newer version of EF.
Related
Converting Existing Dnn Application to .Net core
I have a application of dnn having ado which I need to convert to .net core with ado web application.
In this I have to move only two modules from the application.
what i have already tried so far.
cleaned the database from the dnn tables.
changed the ascx pages to partial views.
changing the ascx.cs pages to the controller.
Need Recommendations for fast conversion and if I can follow any pattern.
Given the nature of the way that the DNN Platform works, there is not a fast transition to a stand-alone installation.
There is no Microsoft documented "Fast" transition plan from Web-Forms to .NET Core as well, so nothing that you can try to mimic from other installations either.
Since you will need to extract dependencies on DNN as well as dependencies on System.Web that are no longer available, it is best to treat such a transition as a re-write, rather than trying to "simply translate" as there isn't any method to do so.
So I have checked many websites, that now it's possible to use .NET Core with Angular 2. My question now is, what is the use of .NET core in these applications?
In the tutorials on the internet, they only mostly use Angular 2 and typescript, nothing from .NET core, except the Startup.cs file.
Per my understanding .NET Core would take are of all the requests (I'm still new in .NET core, so not sure) like JSON, OData, e.t.c. (validating, retrieving data afterwards, and so on). So it would be like a serer side language.
But still, something doesn't look correct to me, so it would be great, if someone could explain it in real-life scenario.
Angular of any version is server platform agnostic. .NET Core has nothing to do with Angular, as it works on the server side, while Angular works on the client side. The two interact, across HTTP, sure, but it doesn't matter what's on the back end.
As Angular 2 has a wide range of client-side uses, it's probably strongest as a framework to use for single page applications (SPA). To that end, using ASP.NET Core on the back end makes sense if you use it to build out API endpoints. Core and previous versions of MVC/Web API all do this well.
You can use .net Core to create an API that Angular then uses. But .net is only one of many possible options.
This question is coming from a Front-End developer new to .NET.
I'm working on a web app that was built a while ago using Webforms. I was asked to integrate two new features to this application. The features would be accessible via two new tabs added to the navigation bar.
What I want to happen is, when the user clicks on the new tab, the application loads up the MVC project as a view inside of the Web Forms app. Here's a link to a picture to explain it better:
The way the project was originally setup is we have the original Webforms project, and we created an MVC project which are siblings inside the same parent folder. The backend devs think this will work fine for them. I have no idea how to get the two projects to load up simultaneously. There hasn't been much work done on either side yet so we're open to ideas of how to restructure this.
I should also add that for the new features the Back-end is just serving up JSON, and I will use AngularJS on the Front-End as opposed to Razor.
Other potentially relevant project info:
Using Visual Studio 2012 (I think we have access to 2013 however)
.NET MVC 4
Webforms (2.0 or 3.5 possibly)
I have an application which is built in ASP.Net WebForms and Silverlight.
There is another WCF services application which is accessed by silverlight part of my application.
Now I have to Re create the whole application in an MVC Single Page Application(SPA) and of course the WCF one because now I would need Web API for that.
An initial solution comes into mind is to add a web api project into wcf services application and start creating web methods there and call wcf methods from there if that functionality was already there.
And for webform start a new spa with mvc project from scratch and use durandal or any other spa client framework(hell of coding).
Any useful solution/advise? as I am looking for simplicity.
I searched around and found some questions but really did not helped as they are about merging with existing apps.
Note: application is a large application with a lot of functionalities
You have to decide how confident your team is with client side frameworks. Development of Single page applications may not be easy in the beginning, but you will get used to it very quickly. It's very important to give your team the right training.
In my opinion, Durandal is the simpliest, most elegant and complete framework to build enterprise level SPAs. It is important to know how knockout, requre and durandal's router and composition work. For data centric application I would use breezejs to manipulate and cache data on the client side and request it from the server side. Breeze works best with Entity Framework on the server side, but it's not necessary. If you can use Entity Framework, it will simplify your development, because it can generate metadata of your database structure for breeze. If Entity Framework is not an option, metadata can be written by hand.
I would make server side as thin as possible. Serving data from your database using web api with ORM of your choice and some cshtml pages.
Durandal Get Started is a good place to start.
Durandal Auth is a very good template for enterprise level SPA. It may not suit you completely, but you can use it as a guidance to build different modules of your application.
Breeze samples I suggest you consider using breeze. There are good courses available on pluralsight.
Knockoutjs has good training on data-binding.
When creating a new web project in ASP.NET are you better off to use the "ASP.NET empty web application" or the "asp.net web forms application"
I would recommend against even bothering with ASP.Net Web Forms. It was an interesting idea that proved to be unweildy in practical applications. The entire web development industry is moving towards some kind of MVC framework or another whether you're using PHP, Ruby or ASP.Net so you're best off using that.
Of course there are still a lot of ASP.Net Web Forms applications out there and they're likely to exist for some time into the future so there is some benefit to learning the technology but I would avoid it for any new projects.
As per your question if you should use the empty project or not it doesn't really make a difference. If you're just starting out the populated project can give you a basic idea of how the structure works but if you're comfortable enough building it from scratch then go with the empty project.
It depends on what you want to do.
Generally speaking, there are three kinds of ASP.NET application project:
Web Forms - what ASP.NET was originally back in 2001. Its use is discouraged in modern and greenfield applications because it is built-around outdated ideas about how web applications should work.
MVC - The new hotness. Try to use this. StackOverflow is built using this.
Everything else - too many to list, but this generally requires you create an empty project and do everything from scratch using IHttpHandler.
If you're new to ASP.NET I strongly recommend avoiding the two project types you listed as they're both for Web Forms; consider using the "ASP.NET MVC Application" options instead - if you're using VS2008 then you need to download and install the ASP.NET MVC 2 add-on. VS2010 and later come with the MVC templates preinstalled.
You might want to use the Empty Web Application project template if you want to work from scratch using IHttpHandler, but you sound new to this, so I recommend avoiding it.