Using .NET MVC 3 for mobile contact form - asp.net-mvc-3

I am developing a mobile version of one of our clients sites. We have decided to go with JQuery Mobile and it is working great, so far. However, the client's desktop browser site has a contact form that was developed using .NET Web Forms. I have read that it is better to use MVC for this type of functionality on a mobile site.
Since all of the mobile site can be developed just using HTML5 and JQuery Mobile except for the contact form, would it make sense to only develop the contact form in MVC and link the rest of the site to it? Or, would it be better to develop the whole mobile site in MVC?
Bonus question, does anyone know if a .NET MVC 3 mobile site has any issues with load time in a mobile browser?

ASP.Net MVC is more light-weight than Web Forms in what it sends to the browser as (amongst other things) it doesn't have a viewstate, so for mobile devices where bandwidth may be limited (and just as a general good-practice), sending less HTML to the client will be better, and will help keep load times at a minimum.
Whether or not you develop the contact us page again in MVC or use the existing web forms page depends on many things, such as:
Does the contact form have enough visits to warrant the time it'd take to develop and MVC site just for that single page
Are there likely to be more dynamic pages in the future, if so it may be worth adopting a platform such as MVC now.
Do you have the time/skills required to take on an MVC site?
Will it look odd if the design of the contact form on the web forms site is different to the rest of the new mobile site?
It's all down to your situation, and whether it's feasible and possible to achieve.
Your other option would be to introduce mobile detection in your desktop browser site, and style the page differently depending on whether the client is a mobile device.
Regarding performance, 51degrees have a product that they say improves performance of ASP.Net websites on mobile devices. I've not tried it personally, as I've not developed a mobile site that has had the need for such a third party tool to boost its performance. From what I've seen, the performance is fine.

Related

Add cart functionality to API or to Client?

I am creating an e-commerce API using the Django Rest Framework. The API will handle the following areas:
Databases
User Registration
Permissions
Orders/Payments
There's still one area in which I'm not quite sure how to implement in my project. It's the cart functionality. Would it be better to implement it on the client-side (ex: React/Ember) or on the server-side (i.e. API)?
One scenario that confused me is if the user is logged in in different platforms (ex: Website and mobile app). I want the user to have the same cart on mulitple platforms.
In that particular use case, if you want cart persistence then it must be backend. The reason for this is one being able to have a single source of truth. The phone app and the web app cannot talk to each other unless they have some sort of "common ground" between them.
That's where the API comes in. It will allow both ends to speak to each other by having the API as the single source of truth. See my terrible diagram for a visual.

ASP.NET Core Web API vs ASP.NET Core Application

First off, I apologise if this is a trivial question but I am getting so confused by the information I am reading. I have put off posting on here as I feel my question is too broad but I can't find a definitive answer. I am a C++ developer by trade but I am wanting to get into web development.
My end goal is to have a web API that is consumed by both a web app and mobile app. I want to get the structure nailed first by developing an web API and web app and then expand it to a mobile platform later on.
My aim is to have 4 separate sections - Database -> WebAPI -> Web App
-> Mobile App
all of which are protected with username/password etc.
I have decided to use ASP.NET Core but when creating an application I am given two options in visual studio - ASP.NET Core Application or Web API. I have tried creating a Web API and a separate Core Application but can't work out how to call the web API. I have also tried creating a Core Application as it seems like I should be able to do everything I want in one project but I am worried that the Web API won't be separated enough to be able to call from a mobile app.
I will be working with a database containing sensitive information so obviously want to protect access to the Web API and Web/Mobile app. I have been watching courses on Pluralsight about Identity but I have read that it doesn't work well with Web API's.
Basically I am getting extremely confused when in my mind my end goal should be relatively simple to achieve. If anyone could give me any pointers as to what technologies I need to use would be fantastic.
ASP.NET Core WebAPI is specifically designed for building REST-ful services.
ASP.NET Core Application is used to create web applications that returns both views and data (it's an analog of Asp.NET MVC from standard Framework).
Which to choose is really depends on kind of WebApp you are going to use. If you plan to use some SPA framework, you don't need mechanisms to generate views on server side - WebAPI is a great choice, otherwise choose Application. Here you can find more details on differences.
As of security concern, there no issues with WebAPI. It provides a lot of mechanisms to secure your API and restrict access to methods based on user's identity. Please look at this article as an example.

API Driven Approach Vs Non-API approach

I am to start designing & architecting a fairly big database business application (data entry, notifications, reporting, data export and usual security restrictions for data). Multiple clients - mobile apps & multiple websites will be there. Plan to use Asp.net MVC5 & Sql server for the development. Phonegap will be used to create mobile apps.
I plan to create an API. All interactions to the Database will be through the API (a REST API). This REST API will be created using Asp.Net MVC5. The front end will be developed as an HTML5 App which calls this API using AJAX. All interactions with the API will be through AJAX calls. Need to expose some of these services (5%) to third parties also.
For e.g. for a supplier management feature, there will be services like SupplierAdd, SupplierEdit, SupplierDelete, SupplierList etc. in the API. HTML5 App will call them through AJAX and do required. Necessary security will be imposed for these services using a login and token based security system.
Plan to use some Javascript frameworks like Angular JS for front end.
The entire application is one with around 200 DB tables and lot of relationships between DB tables. Business logic is only moderately complex. This is mainly a data storage & reporting application.
Is there any problem with this full API based approach ?
Another approach suggested is to avoid AJAX and Javascript and use ASP.Net MVC itself. No separate API will be there for each operation. .cshtml will submit to the controller method and this method will call the Business Layer and do operation. Services which are needed for mobile apps and third parties alone are exposed as API. Is this a better solution ?
The issue which I see for the second approach is that when more and more mobile applications or websites come in future, it does not offer needed flexibility. Also, exposure of some of the services to third parties will be difficult.
I request experienced architects to comment.

MVC .NET or WEB API

We want to write a new web site for customer using SQL DB
and implement only one specific client.
what the recommended technology to be used:
Peure MVC.net
Web API and client side using AJAX
I will be glad to hear the causes, the consideration and the cost.
Thanks!
I tend to favour a web api to handle all of the database work (via entity framework), but use MVC for my front end application.
This way you have all the flexibility of an API should you want to use different frameworks in the future (Angular, ASP.net 5 etc), but you can still have the pleasure of working MVC in your front end site.

Third Party Social Media API'S

I have one web site in which I want to access data of major social media api's like Twitter,Google+,Facebook,YouTube etc....
Anyone know which are third party web sites(No problem with Paid solutions) which can provide me data?
browse the website programmableweb,you can check who are providing their APIs.
Tweed Feed saves tweets as nodes in drupal CMS https://www.drupal.org/project/tweet_feed and is even free. Best commercial all-in-one solution seems to be newswhip.spike https://www.newswhip.com/api/ (desktop search demo for 14 days is free, API costs thousands of euros/month, depending on how many areas and languages you need to cover)

Resources