dcsimg
Results 1 to 5 of 5

Thread: Visual Studio and app development

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2016
    Posts
    5

    Visual Studio and app development

    Hi,
    I have a few questions about building a program with Visual Studio that i can access on any phone via a website. I would like to build an application where i am able to access it via smartphone and enter in data to a database on my server. I don't think i need to make a naive app so i was wondering what type of application i need to use to achieve my goal. Do i use a ASP.net Web Application, WPF Application or what? I have made a few projects before but nothing that was mobile. If you have any information for me that would be helpful.

    Thanks

  2. #2
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,580

    Re: Visual Studio and app development

    Eh, you have a lot of choices and Visual Studio may not even have to be the tool you use.

    See, there's two ways to go about making an app that "works on your phone" with a remote server. Three, if you like categories, but really it's two.

    One is a Native App. That means writing something that compiles to the phone and only works on that phone. For iOS that would traditionally be ObjC or Swift apps written with XCode. For Android that'd traditionally be Java. For Windows phones... well, that's usually a nice tall glass of bleach. New options: Xamarin Forms lets you write apps that compile to native for iOS, Android, and UWP, so you can hit every kind of mobile device with it. A downside to these is you tend to have to mess with app stores.

    Another is a Web App. This is something you run on your server and access on your phone through a browser. So you could use ASP .NET from Visual Studio, but you could also use PHP or Ruby or Python or Node or any number of other solutions. You don't have to mess with app stores for these.

    Some people argue a third choice is a framework like Cordova or Electron that lets you use HTML, JS, and CSS to write an application that compiles to a Native App. I argue this is just a special case of "Native App". It's not really a discussion worth fighting over.

    With your limited experience I don't know what to tell you. None of these options will be very easy. Instead I can add a few more bullet points:

    If you create an ASP .NET application, technically your application will work fine on "anything with a web browser", not just your phone. I don't have any experience with ASP .NET but if you don't care that you have to run IIS for it then it doesn't have any downsides compared to other frameworks.

    If you don't want to make a web application, your choices via Visual Studio are either to make a UWP application so you can target the six Windows Phone owners in the world or a Xamarin Forms application, which requires installing Xamarin.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    32,372

    Re: Visual Studio and app development

    Actually, I think I will argue about Cordova a bit.

    The easiest thing to write would be a web app using HTML, CSS, and JavaScript. If you are going to be learning something, you might as well learn that, since it's so common and popular. However, if you make an actual web app, then you get to deal with security. Any web app is freely accessible to anybody who can find the URL, so if it does anything on the server end that you don't want the average person to do, then you get to deal with securing it.

    However, if you were to write that web app, you could turn it into Cordova in minutes, and then you have what is often called a pseudo-native app (or something like that, pseudo feels like the wrong prefix). The advantage you get with such an app is that you get access to much of the device hardware, including the file system, which was denied to you with the web app. You also get the ability to avoid needing to deal with logins...maybe. Of course, you'd also have a service running on your server, and that service would be searchable via the web, so whether or not you need security on the service is a different matter. The point is that a Cordova app gets installed on your phone rather than being just a website, so you get to limit who installs it, which greatly reduces the exploitability of the app.

    Following this path, VS2017 would be a pretty good choice. VS2015 included some JS editing tools, but 2017 greatly improved those tools such that working with JS in 2017 is almost as nice as working with other languages in 2017. There are ways that it could be improved, to be sure, but it's not just a text editor anymore.

    The services that the app would call on the server could then be written in the language of your choice. VB.NET, C#, Java, or something like node.js would all be possibilities. Of those, I think that VS would handle all but the Java one, so if you leave that out, then VS would be good for both the front end Cordova app and the backend services on the server.
    My usual boring signature: Nothing

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,780

    Re: Visual Studio and app development

    If you go with a native app connecting to a service then, using VS, the logical choice for the service would be Web API, which is basically ASP.NET MVC without the views.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    32,372

    Re: Visual Studio and app development

    Yeah, I've come to really like WebAPI. It's kind of spare, which allows you to do pretty much whatever you want.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width