I am looking to develop basic client server data application to add value to a website.
The website is .net based and opening an api such as asmx web service, json or xml would be simple.
Can anyone tell me what are the limitations - technically, what is possible with flash and also what Apple consider to be good practice.
Does anyone have any Actionscript code examples?
I don't think anything with Flash involved is considered "good practice" by Apple...
Kidding aside, I would go with JSON, it fits ActionScript well, since ActionScript is based on ECMAscript. That JSON has less overhead than XML can also be a good thing on a phone (less bandwidth).
Working with XML is easy in ActionScript since it has E4X, but if you should at a later stage switch to Objective-C/Cocoa, I believe JSON is betters suited than parsing XML.
What you should probably avoid is setting up a SOAP web service. In my experience, it may look as a tempting option on the .Net server side, but is cumbersome to work with on the client side, in scripting languages like ActionScript (and SOAP has a lot of overhead).
All this said with reservation for that I haven't done any development for the iPhone using Adobe's Flash CS5 packager for iPhone.
Related
I'm planning to implement some app that performs similar functions as some website does. An app should be able to post, get and view some data. Most viewing data is available only after login. Payments. The webservices are .NET asmx XML services.
So, I'm planning to use UIKit, drag and drop some text fiels. For posting the data, I will do some manual input validation, assemble input into a string, post it to the server. Also, some parsing will be done after getting info form a webserver. Now, I haven't done any website app before, so I'm just curious what are the potencial problems that I might run into.
I guess you are asking about potential technical issues. The ones I faced recently working on an app of this type and workarounds are:
Maintaining your session with the server if you are combining native UI screens together with UIWebView's of your website.
XML Parsing can be hairy at times, so JSON is the best option depending on your preference. The other solution is to output XML in the PLIST format which is easier to code against. On the server side PHP has some PLIST generating libraries. Am not aware of what is available on .NET.
On the iOS side the ASIHTTP library helps make it easier to post to websites, particularly when you are using binaries etc.
Depending on your use case you may also consider a pure web based UI version which resides inside a UI webview. If you are planning on going this route JQueryMobile is a pretty good solution for rendering iOS like UIs. This saves you quite a lot of effort on the communicating with the webservice and parsing etc.
Thats all I can think of for now.
Biggest problem might be getting it approved by Apple if they think it should be just a website and not an app. They might cite: "Limited Functionality". see : https://developer.apple.com/appstore/resources/approval/guidelines.html
I can also reccomend www.sudzc.com
Your UI will certainly not be as responsive as a native app.
Your users won't be able to use your app without an Internet connection/flaky connection
You'll have to rebuild all native controllers yourself if you wan't your app to look like a native iPhone app.
You'll have to rely on libraries like PhoneGap to use most of the hardware/non HTML supported functions (like geolocation, camera, etc.)
Etc.
I want to develop a native universal app(i.e for iPhone and iPad) for my orgaization.I want to include some of the essential features of the organiztion website into my native app.For obvious reasons i cant store this huge data into iPhone itself.so data will be fetched from the server but application would be a native app.so are there any APIs available to do this?
I always find it's easier to start using sample code, and lucky for you Apple provides a lot of this. Here is the reference library for all kinds of goodies to learn off of and hack your way through: http://developer.apple.com/iphone/library/navigation/index.html#section=Resource%20Types&topic=Sample%20Code
A few noted ones... (I left out some advanced ones like BonjourWeb Reachability and AdvancedURLConnections but look at those once you gain a little more understanding)
URL Cache: http://developer.apple.com/iphone/library/samplecode/URLCache/Introduction/Intro.html
RSS Feed Parser: http://developer.apple.com/iphone/library/samplecode/SeismicXML/Introduction/Intro.html
MailComposer: http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html
Also, a couple books you should get to start your journey on iOS (these are two of the best and easy to understand IMO):
http://apress.com/book/view/9781430224594
http://apress.com/book/view/9781430225058
UIWebView will show any web page you point it to.
Maybe do a mixed approach with some stuff built right into the app, and the bigger or frequently changing parts load from the web.
You can use the UIWebView to access your organization's website from inside a native application...
While I agree that you may need to do your research first, the IPhone/Ipad SDK includes a very easy to use XML parser (NSXMLParser). I would suggest you devise a XML web service for retrieving the data from your company's servers and parse it on the ipad/iphone to the presentation you require.
Best of luck, i've found objective-c very rewarding/challenging.
Firstly i'm not a programmer but I am managing to work my way through developing my own iphone app for my photography business. I store all of my photographs with a 3rd party who make their API available for public use. I want to implement this API into my app.
I've spoken with the 3rd party and they have written all of the code on a windows based system and although they say its not tied to a windows platform i'm struggling to see or recognise any Objective-C commands within the API and so don't know where to start. They've also told me that its a SOAP based web service.
I'm wondering if anyone can tell me if I should be using the NSURLConnection method? My main desire would be to generate a UITable view of the photo categories I hold with the 3rd party as is the case with their own iphone app, which i should probably say is for members only so wouldn't suit my needs here.
I would really appreciate some assistance with this as i'd hate to have to result to paying a developer to build the app after falling at the last hurdle.
Many thanks
Steve
At a very basic level, SOAP APIs are just a standard HTTP requests against specific webserver that return XML responses. That third party may have a Windows-specific client-side library to speed up the development for some clients, but since you are developing iPhone app, you can't use that library.
You have two options:
- use NSURLConnection and NSXMLParser and directly talk to their webservers and parse the response yourself;
- look for an iPhone SOAP library you can reuse. Since SOAP is an industry standard, there's nothing that prevents anyone from building iPhone-specific libraries. However, I personally am not aware of particular ones.
Hope that helps. It's not the best answer, but at least it might give you an idea what to look for around.
Update: Quick search for "iPhone SOAP library" revealed the wsdl2objc project, though that one is rather old (not updated since 2009). There are other alternatives, listed in the How to access SOAP services from iPhone SO question.
Apple also has a Web Services Core Framework, but there's not much documentation on using it with iPhone.
Look at a sample app code which has soap specific files here:
http://mtgr8-a3.svn.sourceforge.net/viewvc/mtgr8-a3/trunk/nvObjects/soap-specific/
In your posting you have mentioned that the 3rd party provided public APIs. If so, can you provide the wsdl? I can covert it to ObjC with SOAP support for you. I am not using wsdl2objC, but something lot better. If it is public API, you don't have to pay me.
What is a strong iPhone framework to start out developing with, besides the SDK from Apple? Are there any that exist to speed up development time?
The biggest framework of this kind is Three20. Facebook and many other companies use this. Three20 is geared towards apps that pull data from the web. It helps with common patterns like a photo viewer or table view backed by web data. Another neat feature is that it has stylesheets, similar in concept to CSS.
Having said all that, some people like it and some do not. There was a brief period where apps using it were rejected from the App Store. Overall, the project looks to have improved since then.
ASIHTTPRequest
Excerpt
It is suitable performing basic HTTP
requests and interacting with
REST-based services (GET / POST / PUT
/ DELETE). The included
ASIFormDataRequest subclass makes it
easy to submit POST data and files
using multipart/form-data.
Also,
skpsmtpmessage
Excerpt
This code implements a quick class for
sending one off messages via SMTP on
the iPhone
EDIT:
A quick google search gave me this link
There is Mono Touch which enables you to develop using C#.
I'm an undergraduate university student who also writes iPhone applications. Next year I'm expected to do a final project, something that lasts the full year and involves a fair bit of software engineering.
My original plan was to write an object-relational wrapper around SQLite for the iPhone (or rather, to massively clean up and extend one I already have) and ultimately release it as open source. Unfortunately, with Core Data being added to iPhone OS 3.0, that's no longer really necessary. (At least, that's how it seems to me; any opinions on this?)
However, I'd still like to do a useful, technically interesting iPhone-related project next year. So here's my question: what do developers need? What sort of problems do you encounter in your apps which seem like they could be handled by some sort of library or framework? My focus is generally more on utility, productivity, and communication apps than games. And since I'm proposing this to a university, something that's either theoretically interesting or attractive to potential students would be preferred. And of course, it'll need to be something that they haven't added to the new version of iPhone OS.
It's in the early stages, but a bunch of scientifically-minded Cocoa developers (headed by Drew McCormack) have joined together to start a BSD-licensed data charting / plotting / visualization framework called Core Plot (mailing list here). This framework is cross-platform between Mac and iPhone, relying on Core Animation for rendering.
While you wouldn't be starting your own project fresh, contributing to this open source framework would be technically challenging and I believe that the framework will have far-reaching applications. I'm sure that the university would be impressed by the potential scientific and educational uses of such a framework.
A library that provides a very simple API that would enable any app to act as an OAuth consumer would be incredible! It could be used to enable data access against hundreds of OAuth-enabled data APIs all over the web, including those of Google, MySpace, Twitter, Yahoo, Flickr, etc. Imagine how many thousands of additional applications you could enable other developers to build with ease.
Your code could be included in pretty much every worthwhile iPhone app that any future developer writes!
I'd like to see a framework that abstracts the interface to various social networking sites. Having a standard API to send updates and post pictures to MySpace, Facebook, Flickr, Picassa, Blogger, Twitter, and other services would be very useful.
A general purpose framework to communicate with a particular iphone from any application with internet connectivity. iphone apps are great, but so much more can be delivered with serivces from the web - so some sort of communications would be nice.
Make some sort of API that can be used to talk to iphone from other connected applications - either web services or desktop, etc.
I ended up having to go in a different direction due to the rules of the project, but I'll keep these in mind as possibilities for future, non-university work. Thanks, everyone!