Architecture for a Website which will have a Mobile app. - android

I am planning on creating a DB driven site/ Application which needs to also have a mobile version e.g iPhone App or an Android App.
What are the things I should consider before building the site.
E.g DB so that it is accesible by the apps too.
Should I build Web services ?
Just want to start off right so I dont need to modify things once the site is live.
This is a general architecture question on how the design of the site needs to be so that it can be accessed by the various app SDK's.

Well I am not sure what language/framework you have in mind.
Personally I'd recommend using .NET with MVC.
Furthermore I would use webservices, but I would definitely make them in WCF vs the older asmx. What is WCF
You can use WCF to create different entry points into your services. EG one for the website, one for mobile devices.
For the database my tendency is to use MSSQL [you can use the free one if you are going to be using under 10 GB]. However you are in no way constrained. Use MySQL if you want, or hey, maybe you don't need an RDBMS, in which case try MongoDB!
The main thing to consider though is that it really depends on your needs and what you are delivering. You are getting my preference not The Right Thing in all cases.

Related

Android application backend

I want to make an android application which will display an external message (For example: some quotes, proverbs etc) daily.
The message should be retrieved from some place other than the client device and I would like to configure the messages from back end
These messages should also change everyday.
How should the back end be and how can the android application retrieve the configured message ?
Do I need a server at the back end for the same or can avail some cloud services for the same ?
What is the best approach to do?
If you want to avoid having to set up and manage a server on the backend yourself you can take a look at a 'backend as a service' offering.
Two example candidates are:
https://parse.com
http://aws.amazon.com/lambda/
Both Parse and Amazon provide SDK's to allow you interact with the backend from your Android app.
You will likely want to study this a little to decide if you want this type of solution or to build your own server as Brian suggests - I think there are pros and cons to each approach and you'll have to choose which is best for your case.
Yes, you will need a server. You can start building the server software on the same machine as your Android emulator and create them in parallel. You'll need to choose a language and most likely a web server framework that suits your thought process and style.
If you want to use REST, for instance, google some for "best REST server framework". You will get hundreds of answers that don't mean much, but look at the communities that surround the frameworks that come back. Look at the user lists and how many questions about it exist on this site. That will give you a better idea of whether you can ask questions and get answers when they arise. You are making an investment by learning a framework, spend a little time deciding which one you are going to use, possibly by trying a few of them for a very simple site that returns the kind of data you are looking for.
Other than that, you really need to ask specific questions once you've chosen a language and a framework. Hope that helps.

How can I get data from a view using Azure and Mobile Services?

I'm trying to get the data from a view I created in the management portal of Azure. However, I'm not entirely sure of the syntax? If I use client.getTable(viewName) it doesn't work/doesn't find it. Additionally - AFAIK I know I'm meant to add the view as a table under my mobile services, but I get an error 400 when I try this. I'm using android as my client application.
Any suggetions?
Using Views in Mobile Services is not really stright forward. This article does a good job on describing how to model a Mobile Service to support custom queries and views.
Yes, it involves creation of dummy tables that will stay empty. And would even call it dirty hacks to support a trivial things. But this is the reality for now (October the 2nd 2014). Hopefully that will change (soon).

jQquery Mobile site project for categorised notes - sanity check please?

I am asking for your advice and a sanity check, please. For a couple of years I have thought about building a mobile site for my own purposes (initially) that will allow me consistent interface on the web and on a mobile phone. My initial target is Android 4 and above.
The central idea is to make notes via web interface. It is easy to
edit on a full PC. Basic formatting is necessary - bold, italic,
lists. I should have some basic editing / adding capability from the phone.
Possibly I might need to add images. This at a later stage.
I will need to use tables.
View these categorised notes on my phone when I need to access that information quickly.
Information should be searchable.
I should be able to categorise that information both hierarchically and by labels.
On the phone the last copy of the information should be available even when there is no internet access. That is the key bit of this project - clear, well structured information, easily available when needed.
So far I have done some 7 websites 6 - 9 years ago and this year I did a responsive design interface with jQuery and HTML5. I have access to Apache on a linux hosting site. I have looked into jQuery Mobile. I think jQuery mobile should be great for my front-end. From my past work with LAMP servers I think I have to have a database backend to this project. What I have looked into so far suggests that the best would be to invest some time in learning Ruby on Rails (which looks very interesting to me) and use that as a back end interface with a database. What database I should use, I don't know. I have in the past used mySQL, also programmed Access and a bit DB2. I have heard a lot of good stuff about postgres. However considering the mobile phone, I think I should go with SQLite probably? What should be the general mechanism for updating the phone from the net?
How does the above look?
Maybe there are some projects which already do something like this?
I don't think I should use some big CMS systems with their bloat and all, because I really want this thing to work for me. Same goes for generic note taking systems such as Evernote. So I am wanting to build it from the ground up, unless there is some similar lightweight project that I could build upon. I am not in a particular hurry, but I am about to get started soon.
A great type of answer for me would be one which tells what major components I should use for this project. It also would be good to know if I am overlooking some important bits.
I appreciate that what I am asking is a large question, but I am not expecting a Wikipedia in response. A sanity check and pointers in the right direction is what I need.
Thank you for your time and thoughts.
What a wall of text... 1.-7. are all achievable by using jquery mobile and HTML5 and a good database architecture as backend. I don't see any BIG problems in your idea. What database you use is up to you, your requirements are not that special, that it would require some specialized product. Any established database backend should do the job.
For updating the content on your phone take a look on HTML Offline Cache and implement an update feature in your Frontend.

Phonegap vs MonoTouch/Droid

We have an upcoming [big] project, involving a series of mobile apps. Unfortunately we're still new to this market. Our biggest problem is not learning something new, but rather having to develop the same app twice which means approx ~ twice the cost and Hence we're trying to find a cross platform solution.
Since our expertise is in C# and .NET we are very interested in MonoDroid/Touch, and from what I've read that it is a mature framework.
However it is not exactly cross-platform (or am I wrong ?) and so we turned to Phonegap, which lets you build mobile apps with js, css and html which are technologies which we feel comfortable using.
Our apps are going to be very data intensive and might also require to be "invoked" by the server, i.e. there might be 2-way communication between the server and the app.
and so my question, given these kind of apps would you suggest phonegap or monoTouch/Droid?
Thanks in advance.
Monotouch is NOT cross platform. It allows you to create reusable elements, but you can't build once and deploy to all platforms, especially if your project is really as complex as you are making it sound.
I don't know much about phonegap. I've always steered clear of it. It might have changed since I looked at it last, but as I gather its not very robust and doesn't create very good apps, especially (again) for a complex app.
There is another cross platform framework called Titanium, but similarly to the both above its not great. There is more support for it every day, but it is missing some key components and you tend to get so far into a project and realise that you're not able to get any further.
My answer, which you're not going to want to hear, is that you should do it for each platform separately, and charge your client as such.
Creating a mobile app cross platform is like creating a t-shirt that will fit everyone. Ok, so you can make it stretchy, and you can design it in a way that will "suit" everyone, but what you'll end up with is something that is going to be too big or too small, and no-one will enjoy.
iPhone, android, iPad, blackberry, windows phone 7, bada etc etc they're all VERY different platforms. Just because they're both mobile phones doesn't make them similar at all. The way that the UI is designed and displayed is varyingly different, and the way you interact with the hardware (and ultimately the user) is also different. Case and point - iPhone as you go down views you create a navigation stack which you navigate using a back button in the title bar (which has the title of the current view in it). Android you navigate with the back button on the device and the action bar is used for the app title and other "action buttons".
To this end I would suggest, if you REALLY don't want to do everything natively (which is definitely the best option) then I would suggest looking at Monotouch and creating two apps with reusable components.
With PhoneGap you will create a web application. It can look like a native app, but it's really a web app running inside a browser object.
You'll be programming the client HTML and javascript, just like any other client side web app. You can create ajax calls to the server to get your data and do all your usual C#/.Net stuff there.
With Mono, you will create a clients side application, and you can program that client in C#/.Net.
PhoneGap will be more or less free and can be used for other platforms than Windows, iOS and Android as well, though you'll have to setup environments for each version. You can compile for all platforms in the cloud, but that'll cost you money.
MonoTouch/Droid will set you back a few hundred dollars.
For each platform, you will have to do some extra tweaking. Probably giving it a native look and feel, call different API's, etc.
I would personally advise the Mono route, since you know C#/.Net already. It'll give you results faster. Make use of the free trial for MonoTouch and see if it's something for you and if it's worth buying ($698 for both 'touch and 'droid).
It depends.
I agree that going native gives you the best possible performance and user experience. It's certainly the only feasible option if the app has a demanding UI. But if the app is more informational (perhaps displays news feeds for example) then a hybrid HTML5 app could be the go. The support of HTML5 within a UIWebView on iOS has some quirks in the older iOS versions so tread with caution. And on Android and other platforms, HTML5 isn't quite there yet. Certainly not on older hardware that doesn't have the grunt or browsers with suboptimal javascript engines.
With your .NET background, I suggest you have a look at http://www.vsnomad.com and evaluate it for yourself. Throw a quick demo together and see how it holds up. Otherwise, yeah, go the native route.

How to use webservices in android?

I want to know about how to call webservices in android I had done a lot of search from Internet and have read several tutorials but was not able to understand much and manipulate, can anyone suggest any Tutorial, or provide any Pdf file or any book related to web services so that I can understand it.
Thanks in advance
The first reading I would suggest is this one - this is the W3School tutorial. Don't forget to read the related chapters included in this tutorial - Soap, Wsdl, etc - as this tutorial taken as a standalone would not be so valuable. This tutorial is not specifically related to Android but will give you all the information needed to understand the use and constraints of this kind of architecture, and then structure your project.
Under Android, you will face the specific contraint of mobile phones and tablets: the network can be down, and is often down: in the tube, in a basement, in any area that have a bad network coverage. So you will have to take care of this, either by caching data or allowing the application to work in degraded mode when no network is available. These are just examples as I don't know your context.
After that, Android is developed in Java, with a specific API that comes on top of the regular java.* packages. These are just tools to implement the client side. On server side, depending of whether you control these services, you may also have some implementation to do. If so, this can be Java, PHP, .Net, anything: one of the purpose of the web services architecture is to stay independant of the remote implementation to only care the exchange protocol. But reading your question, I think the two first points are more important (or have an higher priority let's say) than the implementation as they are prerequisites. (EDIT: Anyway, a useful discussion about that can be found here on StackOverflow.)
Android Doesn't have it's own tool then you should use your own or use some Thing Like KSOAP2.
You Can Use This.
http://www.c-sharpcorner.com/UploadFile/88b6e5/how-to-call-web-service-in-android-using-soap

Categories

Resources