Solved

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

Posted on 2016-08-12
8
105 Views
Last Modified: 2016-10-07
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
Comment
Question by:SamCash
  • 3
  • 3
8 Comments
 

Author Comment

by:SamCash
ID: 41830307
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
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 100 total points
ID: 41830452
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
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 41831114
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:SamCash
ID: 41832269
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
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 400 total points
ID: 41832408
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
 

Author Comment

by:SamCash
ID: 41832704
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
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 41834139
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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Disable and re-enable a dynamic System.Timers.Timer 6 28
Achieve json result 2 35
Close word object 13 24
Service Statictic 11 14
A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now