Ext JS with C# Backend - asp.net

Im currently starting a new WebProject. The plan is to generate the entire frontend via extjs and communicate with a C# .Net Backend (via ExtDirect !? )...
My problem is that i dont really know what VisualStudio Project Type i should use..
The backend should only handle the requests from the Ext JS (and communicate with an other EntityFramework Projekt though thats not a problem)... Are there any tutorials around? I didnt find something like that. I am not sure if i have to use an ASP Web Form Project because i didnt planned to use any ASP controls or something like that. Like i said i want the frontend to be generated by EXT JS only.
Please help. Im glad about any input :)

I've built a project with ASP.Net MVC and extjs as the front end. You could also use something like a WCF service to handle your server side calls but the ASP.Net MVC framework works fine as well.
I used an Ajax proxy in my stores that call my ASP.Net controllers which then call the database and I return the result back as json.
I used this project TraXPLORER = ExtJS 4 MVC + ASP.NET MVC 3 + CRUD + REST to help me get started.
You also may want to check out Ext.Net as it's a wrapper for the extjs library for .Net apps.

Related

BLAZOR + MVC - passing data from Blazor page to MVC controller

I have MVC project, which uses some Blazor pages. What I need now is to pass data back from Blazor page to MVC controller. Is that even possible? My solution is to write data to the DB and get them after in MVC...but I don't like this way. Someone knows a better solution?
Thanks.
There is no built-in functionality for this, you need to use an HTTP client, such as HttpClient. See an example on the Microsoft documentation site here: https://learn.microsoft.com/en-us/aspnet/core/blazor/call-web-api?view=aspnetcore-3.1.

AngularJS and ( ASP.NET or ASP.NET MVC )

I want to build a Single Page Application using AngularJS as an client side framework but I struggle to understand if I can use the ASP.NET as my server side framework?
I know that AngularJS is an MVC framework and when I'm trying to decide wich server side framework to chose all I hear or read is MVC, MVC,...,MVC.
I know, this an subjective question, but still, can any one tell me if I need to learn ASP.NET MVC or I can still reach the desired result using the ASP.NET framework?
You can use whatever technology you want.
Basically to be able to communicate with angular you need something that listen for http requests (an http server so), parse them and that can send/read json (with maybe some extra libraries). The static pages can just be deserves by an apache in front.
You could do that in C parsing the whole thing yourself, but for performance, maintenability, speed of development and a bunch of other reasons, it's better to use an appropriate framework.
If your application is not big-scaled, specially in the backend part just search for a c# rest framework that handle thing that url mapping and json.

Do I need ASP.NET MVC 5 SPA template?

I want to build responsive SPA web application. I followed old paradigms before and the way it is supposed to be done nowadays is not very familiar to me, so sorry if my question seems unadequate.
Now I'm trying to understand the motivation behind this MVC 5 SPA template: why would I need to use MVC and Web API in one application?
My app will not act as a service. I can simply return JSON from my action methods. If in my case it is absolutely not neccessary, what factors could change the situation in favor of using both WebAPI and MVC at the same time?
You don't have to but it is useful.
I'm usually using MVC for
generating initial html file for my SPA through index.cshtml
(bundles + some customization of initial html code)
generating dynamic JavaScript code (usually for something like configuration angular modules)
Web API or OData kicks in aferwards providing endpoints for your favourite SPA framework (angular / knockout etc.) returning json or even xml if you need.

ASP.Net Controls in Delphi

I'm sure this question has been asked already but I couldn't find any posts.
Is it possible to use an ASP.net control in Delphi 2006 for Win32? We have some Dev Express ASP.Net visual controls (Chart controls to be exact) that we would like to use in our Delphi application.
Is this possible and how could it be done, preferably without the need to purchase more third party components.
Thank you.
you cannot use this kind of controls directly in a Delphi Win32 Application, because this components are designed to run in a web server with ASP and expose the results to a browser client, i think which your best option is use a local (or remote) web server and make a web page which accepts HTTP requests, and then in TWebBrowser in your Delphi Win32 app load the page to get results.
That is not going to be possible as the DevExpress ASP.NET controls are wired up via handlers in the web.config and not something that can be forced into Delphi. I assume you have looked at DevExpress's VCL controls for (Delphi and C++ Builder Controls) on it's website? If the VCL product suite does not have what you need then you will need to look elsewhere.

ASP.net using iframes

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.

Resources