Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

"best practice" architecture for adding mobile devices to an existing Webforms MS-SQL project

I am trying to choose the "best practice" architecture for adding mobile device access to an existing WebForms MS-SQL Project.  The current WebForms project's architecture is  "Webforms, interfaced to IIS and .Net, then interfaced to MSSQL".  Using mobile browsers are not an option.  Currently using Visual Studio and SSMS.  Is it good practice to connect the moble devices to IIS for MS-SQL access?
0
SamCash
Asked:
SamCash
  • 3
  • 3
2 Solutions
 
SamCashAuthor Commented:
EE,

I have edited the question.  Hopefully someone will ask for more information if the edits are not enough.  

This is my first mobile task.  I have done a lot of browser to ms sql projects, using IIS and .Net .

Regards
Sam
0
 
David Johnson, CD, MVPOwnerCommented:
I really don't think that there is a "best practice" for this. When it comes to coding a new application if you separated the different areas of the program into the display layer, the business logic layer and the database layer then it would be easy to replace the display layer into webform, winform, IOS, Android apps. You could also replace the database layer with MSSQL, MySQL, Oracle, or whatever is required.
0
 
Ryan McCauleyData and Analytics ManagerCommented:
Though I'm not sure all the details based on your description, it sounds like you'll be writing a mobile app using the .NET Compact Framework - I've used it before and the mobile apps work pretty well (and you have access to most of the framework, so your code should run with minimal modification). Obviously the screen sizes are different so you'll have to adjust the layout, but the business layer (if there is one) should be able to run much the same code as what runs on your clients.

As David said, there's not really a "best practice" here, but mobile devices present their own issues - the largest may be intermittent internet/network connectivity. You'll need to either check for a connection and stop your user from doing anything when one isn't there, lock the app to "read only" mode in some way in those cases, or set up a way to cache changes locally and synchronize them to the server once you get back into service range. I've used SQL Server Compact before and had success with it, but it may not be appropriate for you depending on what you're doing.
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
SamCashAuthor Commented:
David, Ryan,

Thank you for sharing your experience.

There are currently 221 Stored Procedures (MS SQL 2008r2) that have been in public use for 20 months, very seldom running into any bugs.  A nice interface from sql to C#.  Many helpers and then a business layer that gets/sets about everything one could think of.  Next there is a (separate pages) webform code behind (which types and formats (.ToString() the data or sets properties of controls for the UI presentation, i.e. does little or no actual computing) then the markup.  

What I am thinking is the mobile app would connect to IIS and use everything except the webform code behind and markup.  The mobile app would do requests to IIS calling the same business logic and everything in the below layers.  The app would need to be codded to achieve the similar task which the code behind is doing in a webform and of course the apps different UI.  In addition, thanks Ryan, connectivity, cashing, locking and updating when reconnected.

ps: This project already operates on mobile devices with their browsers, but the loss of screen area, layout, tabs, etc... We have tried a "responsive" approach.  Which indicated we would need to have two sets of pages, mobile/desktop.  Multiple pages or a responsive approach would be just a partial solution, where an app would be a full solution.  Management decided to try a mobile solution, even though we have no experience.  I am the lucky guy.  So if I can leverage all the prior code and just learn the app areas as required above, not having to rewrite all the business logic on down, I might get this done before the end of the century.

Does this seem like a reasonable approach? Comments, ideas, criticism appreciated...

Regards
Sam
0
 
Ryan McCauleyData and Analytics ManagerCommented:
Sounds like a good approach - you actually have a head start in that you have a significant portion of your code running in IIS or on the SQL Server, so you don't need to worry about that functionality.

I think you're on the right track - mobile apps aren't hard at all to develop if you're using .NET CF, especially if you already have a .NET app (or website) as your guideline and original source for the code. It may even be worth moving some of that code into a DLL that supports the website, and then you can have it in both places and just create the new interface for mobile devices.

Good luck!
0
 
SamCashAuthor Commented:
Ryan,

.NET CF looks like Windows OS only.  I need Android and IOS first (most of the market) then WinPhone.

So I think I need an interface (3 of them) from the mobile devices to IIS, so I can call the c# functions on IIS, similar to a browser request?  Should I post a question on EE about an interface from the various mobile OS's to IIS?

Regards
Sam
0
 
Ryan McCauleyData and Analytics ManagerCommented:
Ah, for some reason I was thinking it was Windows Mobile devices - clearly something you didn't say initially :)

Yes, asking about the best way to access web services from each OS would make sense as a new question - it looks like there are libraries for each that allow you to access them easily, but I've never personally used any and can't really give guidance here.

Good luck!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now