I have an MVC webapp and am creating a Winforms app. The methods I have created and use in the MVC app will also be used by the Winforms app. Is there a way I can share the code between them so that I can update it all in one place? Maybe turn those methods into a dll that they both use? If so, how do I go about doing that?
Related
We have huge enterprise application written in angularjs.
Now we have to migrate to angular, so we have ruled out an option of hybrid approach angular suggests using "ngUpgrade".
So now we are creating a new application in angular, which means we have 2 applications "angularjs(old)" and angular(new).
So to switch between these two applications can be done without refresh using angular-spa.
I was trying to find if there is another framework, where navigating between two apps happens without refreshing(without refreshing entire page by navigating to new html).
Possible solution:
Use a new Angular application as a wrapper, then just use iframe to show the application you want depends on the context - old or new. The issue you might face is changing the iframe, but I guess you can use postMessage to communicate between the apps.
A bit more sophisticated:
Use Angular Elements to create your hybrid app.
I really recommend you to watch Erin talks from the last Angular connect about how Google made the migration from js to Angular.
I've recently tried the micro-frontend architecture described here:
https://www.martinfowler.com/articles/micro-frontends.html
Each app on different code repository, runtime build and quite easy to implement. Take a look :)
I have a asp.net core web application. My application has some reactjs components, that runs client side.
In my asp.net core views, i use IViewLocalizer to localize my pages and it works just fine.
I have found some projects like react-localization to handle this on reactjs. To use it, I need to do one of the following:
In my view create an object with my resources and give it to react-localization
Create an endpoint that return my resources, call it inside reactjs component and give it to react-localization
My question is, what is the best approach to bring localization to reactjs components?
When i posted this question, i had a simple react application with less than ten resources.
I chose the number one option, in my view create an object with my resources and give it to react because it is a more simple solution.
On another big react project, i chose the number two option: create an endpoint that return my resources and call it inside reactjs. It is a bit more complex, but all logic is inside reactjs and the html does not have a giant script object with all resources.
We have an asp.net website running in our company. This website majorly use AJAX calls to interact with server and for that we have web methods in our code behind files.
Company is thinking to switch technology to Angular JS. I just want to know whether it is a good practice to use Angular JS with asp.net webforms or we have to convert from webforms to
asp.net MVC in order to switch to Angular JS? I have already read relevant questions but I need more specific answers, any one please put a light on this.
As I look at it, it doesn't really matter what you use, because angularjs is implemented using only javascript and html code, and in both cases I don't think that implementing it in either asp or mvc will have any major impact, this does depend on your project size and complexity but for the most part I don't think you will face any problems.Then again this is just my viewpoint on this matter.
I have used AngularJs on top of my ASP.NET mvc projects. Even though both AngularJs and ASP.NET are based on mvc architecture I can see some advantages when using AngularJs on top of my ASP.NET mvc projects. The main advantage that I see in this approach is better rendering of views. If so why not use ReactJs with ASP.NET mvc since it is purely focusing on views. Why do we have to mess up with two mvc frameworks. Won't it be better to use Reactjs on top of ASP.NET mvc than using AngularJs and ASP.NET mvc combination (Note that I will always use ASP.NET mvc and I don't want to use a pure JavaScript framework). Please correct me if I am wrong. Thanks in advance.
I've used both angular and react in projects in the past. With angular you dirty your html markup with angular code. With react it's all encapsulated in a component. As I was never an expert with angular I may not have used it to the best of it's ability but to me Reactjs seems like the better framework and seems like a better fit with ASP.NET MVC.
I don't believe there is one correct tool to do the job though. It's really whatever suits your needs and what your comfortable with. I would suggest giving Reactjs a shot though.
I have a silverlight application, it has pretty complex UI. In some forms I am using MVVM pattern. However there are many forms where code behind file has most of the form logic code (no view model).
Silverlight application is having both business and UI logic. There is a WCF service which SL application is directly calling. This WCF service is a data service (DB logic).
I want to migrate silverlight application into HTML5. I have following questions.
There are many links to migrate the SL application to HTML5 (even using MVVM pattern). Many suggests to use some JS framework library like AngularJS/Knockout. Can you please tell me which one works best for migration from SL?
Where would I put the business logic? Can I write my business logic using JS library? Also in case I write business logic using some library then won't it expose all my logic to client?
In case JS library is not the right thing to write the business logic then what other technology I should use? WebAPI or something else?
Atul Sureka
For Server Side Code Reusablity (MVVM) Code use AngularJS/KendoUI
Use C# Object to JavaScript Object Convrsion
Server Side Logic we can Re-Use, Client Side Logic C# to Java Script
User Rest API's