Can I run an ASP.NET MVC2 website with a database from the iPad locally? (iPhone) - asp.net-mvc-2

I really want to run my test websites from an iPad to show to clients but I don't want to have to rely on the 3g connectivity or wifi. Can I run sites that are compiled from an App or something similar on the iPad?
I have seen Mono Touch but I wanted first hand views on this as if I can I'm going to buy an iPad ASAP.

You can use Service Stack to create web services. I'm sure you can serve up HTML one way or another. I haven't tried it.

What you're looking for is IIS or Cassini for the iPad, which doesn't exist, as far as I know.
Using MonoTouch, you'd have to create a native app that simply functioned as a browser shell and served up HTML. MVC works in Mono, so you could do it using a local db, but it would be a lot of work, and I'm not sure what that would buy you... Other than an iPad, which just might make the effort worth it. :)

Hmm, a bit of a hack, but extending waht ifwdev said, if you can expose services as JSON endpoints, you could mock the UI using raw HTML and Javascript instead of server side code (PHP/ASP.NET etc).

Related

Optimise ASP.NET application IPhone and Android browsers for ASP.NET application

I have an ASP.NET (not MVC) application.
I would like to create a version that is optimised for browsers on the IPhone and on Android.
Some questions
Is it possible to detect IPhone/Android when the site is accessed
Are there any gotchas/tips for developing ASP.NET for these devices.
We're using a combination of .net webforms and jQuery mobile.
For our viewstate, it's been pretty well neutered already so only minor stuff is going down to the device.
Bear in mind that there are around 3 different mobile api's. Each of which has their own drawbacks. You might want to investigate each.
Also, we took the approach that the mobile site was a completely different website than our standard one. When the user comes in, we do some browser sniffing and push them to mobile if it matches with a link to move back to the full one if they want.
Webforms aren´t good for mobile, it generates big pages because viewstate. And you can´t control rendering (some more in .net4).
You can detect device using a db of capabilities like WURFL (I recommend 51degrees) o maybe using some like http://detectmobilebrowser.com/
I don´t know what kind of webapp but you could make a new app, maybe using MVC. Please look this resource.

Website to iphone compatible

Hii all... I have to work on a website and make it configure to iphone...
I mean like following this and this
These website run differently on iphone and different on a normal browser
specially second one which Look like a table view when it run on iphone..
I want to make my website like these....
How to make this
are there any templates to do this please help
Also have a look at some mobile web development client side frameworks like jQTouch.
http://www.jqtouch.com/
As well as iwebkit.net which do a lot of the work for you. In any case they should provide enough sample code to give you a good idea where to start.
Look for iPhone in user agent and serve different CSS, views, etc.

Is PhoneGap on iPhone pointed to local proxy possible and allowed?

We are looking on building a project that would run on Android, iPhone and other platforms with Phonegap. The app would be fairly simply, making use of the camera and basic UI features. The first versions would simply point to a web service and load information from there.
Over time, however, we want to improve the speed by:
1.) Downloading content via a separate thread when the app is running and storing the results in a local database,
2.) Hosting a mini webserver in the app*, and
3.) Pointing the PhoneGap UI to the app's mini webserver instead of the service's external webserver.
Two questions:
1.) Is it technically possible to host a mini webserver in iPhone that the app will access?
2.) Would this functionality be rejected by Apple?
Thanks in advance.
*I realize this step probably isn't really necessary. But, if it enables to truly build a "write-once-run-anywhere" UI, it might make sense still.
You're much more likely to want to have the HTML for presentation generated on your actual server, downloaded and stored by your separate thread as an .html file on the iPhone filesystem and served through local URLs using PhoneGap. Essentially, an advanced cache.
This way no web-server is necessary and you only need to write the UI generation code once on the server.

Iphone web application

I am developing a iphone web application. I already have a website designed using php and mysql. how I can convert this website to compatile for iphone.
pls share your thoughts.
Thanks
If it's specifically designed for the iPhone, then you can simply load it up onto one and develop accordingly. If your site is primarily desktop oriented, then you could:
Do nothing. The iPhone is designed for non-iPhone-aware web sites, and so your's will probably work just like that. In practice a little tweaking will probably make things much better.
Build a parallel site, custom-made for the iPhone, and use browser-detection to redirect to that site when an iPhone comes knocking.

How to deploy a web application on iphone?

I have developed a website in asp.net for iPhone.
Now I am stuck in how to deploy that site on the iphone?
Never done it before.
How to make it iphone ready so the device can access the site ?
Any ideas...
Thank you All.
Social Circus, as Mehrdad says you don't need to change anything to allow users with iPhones to access your site; iPhones use a mobile version of Safari that renders pretty much everything like a normal desktop browser. There are a few things worth noting however if you want iPhone users to have a good experience browsing your site:
No Flash. If you've used Flash at all in your site it won't work on iPhones (or most other mobile platforms).
The resolution of the iPhone is 320x480. The top and bottom bars will take off a minimum of 20+44 = 66 pixels. You could implement a CSS template that re-formated everything into 320 pixel width but this is a lot of work. See something like Google Mail in an iPhone browser for an example.
iPhone users will be able to add a shortcut to your webapp on their desktop, with a name they want, so the actual URL matters less from this perspective.
Finally, it's worth noting that many iPhone users think of webapps as a bit "passe" - a bit old (man that's sooo 2008!). This isn't really fair but it's mostly true. With 65,000+ apps on the app store no-one's going around looking for webapps any more. For a better chance of adoption, especially if it's something like a game, perhaps look at using the SDK to write an iPhone-specific version? (quite a lot of work usually!!)
Hope that helps
Copy the stuff to the Web server, setup the databases if necessary, just as you'd do for a Web app designed for desktop browsers. Is this a real question?