iphone, how many coder use HessianKit in app ? whether it is better than SOAP and JSON? - iphone

I think that seem is more good performance , but have not use in app.
I have use the kit in a test app, but I found the code seem is not good, some exception does handle , the test app crashed like when connect failed, I have to modify the core code of the kit to solve such problem.
I am not sure whether the lib code is stable ... anyone have experience on this field (choice which solution, XML JSON or other ) ,
thanks.

I am not too sure about this question. But here is my 2 cents.
HessianKit has 40+ new downloads per months.
Not super well known.
It is in use in more than 20 live apps on App Store projects that I know of.
Tested in real production, both games and business apps.
The license is very forgiving.
So I have no clue about real total usage out there.
HessianKit pros:
Works effortlessly with existing Java servers.
Just as easy
Almost non-existing manual glue code.
Server calls treated just as any other method call.
Just avoid calls from main thread as with any IO.
Payload is small, as in freaking tiny.
On celular network this actually matters.
Hessian cons:
Communication payload is not human readable.
I am biased, since I am the developer behind HessianKit. If I was to suggest anything else, then I would say JSON. For the following reasons:
Human readable.
Buzz-word friendly.

Related

Can I use webassembly for plugins like blender uses python?

I was talking to a friend of mine who knows a lot about js and wasm.He told me the technology goes far beyond web, since it is basicly a way to run near native applications on devices without actually giving them access to the computer.
Which means that thrid party or untrusted code on a smartphone for instance cannot accidentally or intentional change other apps or parts of the system.
This seamed to me like the perfect conditions to build a plugin system for an application I am working on.
I asked him about it but he was unable to give me a clear answer.
So the question is, can I use webassembly outside of a webbrowser, with custom bindings to safely allow users to extend the functionality of my application (a special image viewer) without sacrificing too much speed? It seams it should work using libnode or something, but is there a problem I might run into?
I don't know how much you know about web assembly but it depends on what your plugins actually should do. If it basically handle Arrays and numeric data with not that match interacting with host applications then it might fit. But when you have heavy object handling then it will not fit at the moment. So for image processing it might be perfect match like it is used in some web examples. Also be aware that some web assembly targeting system or not suitable for none web targets as they generate also some javascript code to be used in browsers beside the generate wasm. Some wasm modules for example require that you call malloc and free for string handling other have functions like new and gc for the nearly the same.

Call REST Webservice from Blackberry

I am new to Blackberry app development. I need to call REST webservice from blackberry application using JDE 4.7. I searched but not got any solution. Anyone help pls?
sri
You have to make an HttpConnection request and read the data as an InputStream... have a look at this tutorial Calling REST based web services
I appreciate this an old post - but it has been updated so someone is looking at it, so I thought it appropriate to contribute.
I am sorry, but I can not recommend the code supplied the link from another answer called "Calling REST based web services".
I have made a comment explaining this on the site, along the following lines:
"In my opinion this code is flawed because it does not consider the different connection methods, nor does it consider different encodings. More over it does not consider the Event Thread or provide reasonable error checking and logging. I appreciate that this is just a sample, but I think the author has a responsibility to make people who might use this code aware of how it should be used properly. And this code will cause more problems that it solves. Refer to the supported BlackBerry documentation and web sites for better samples."
Sorry, I am not as familiar as I should be of the questions asked on stackoverflow, but questions like this come up regularly on the BBRY forum here:
http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev
I recommend that you go on that forum and type network in the Search box on that site and you be presented with a range of tutorials and KB articles that discuss all aspects of networking. In this particular case I would recommend this:
http://supportforums.blackberry.com/t5/Java-Development/What-Is-Network-API-alternative-for-legacy-OS/ta-p/614822
Networking is not trivial on the BlackBerry, do not expect a cut and paste of the code supplied to work for you. Specifically you should be aware of:
a) The various connection methods, the costs associated with each and the impact that using each might have (e.g. transcoders or caching)
b) The Event Thread, how to get off it and back on when processing a response
c) Logging and reporting so that you can investigate problems when they occur (and they will).
Personally, given that all OS 4.7 devices can be upgraded to OS 5.0 and should be, since OS 5.0 is better, I would forget supporting OS 4.7. Instead look at OS 5.0 and above support and use ConnectionFactory.

Any good client-server data sync frameworks available for iPhone?

I'm just getting into the client-server data sync stage of my iPhone app project, and have managed to get my CoreData data model loading on both the iPhone client and my TurboGears server (which is good). I'm now beginning to tackle the problem of sync'ing data between the server and multiple clients, and while I could roll my own, this seems like one of those problems that is quite general and therefore there should be frameworks or libraries out there that provide a good deal of the functionality.
Does anyone know of one that might be applicable to this environment (e.g. Objective-C on iPhone, pyobjc / Python on the server)? If not, does anyone know of a design pattern or generally-agreed upon approach for this stuff that would be a good road to take for a self-implementation? I couldn't find a generally accepted term for this problem beyond "data synchronization" or "remote object persistence", neither of which hit much useful on Google.
I did come across the Funambol framework which looks like it provides this exact type of functionality, however, it is C++ / Java based and therefore seems like it might not be a good fit for the specific languages in my project.
Any help much appreciated.
Since you are using TurboGears already, take a look at the RestController documentation. Using RESTful services has become a widely adopted architecture with many implementations for both clients and servers. Matt Gemmell's MGTwitterEngine is a good example of the client implementation of a specific API, Twitter.

iPhone Development - calling external JSON API (will Apple reject?)

Ok guys, so im new to iPhone development, so apologies if this is a silly question, but before i actually create my app i want to know if this is possible, and if Apple will reject this.
(Note this is all theoretical)
So i'd have a API (.NET) that runs on a cloud server somewhere and can return HTML/JSON/XML.
I'll have a website that can access this API and allow customers to do some stuff (but this is not important for this question).
I would then like my iPhone app to make a call to this API which would return JSON data. So my iPhone app might make a call to http://myapp/Foos which would return a JSON string of Foo objects. The iPhone app would then parse this JSON and do some funky stuff with it.
So, that's the background, now the questions:
Is this possible? (that is, call an external cloud API over HTTP, parse JSON response?)
What are the chances of Apple rejecting this application (because it would be calling a non-Apple API)
Are there any limitations (security, libraries, etc) on the iPhone/Objective-C/Cocoa that might hinder this solution? In regards to Security - can you freely make a HTTP (or even HTTPS call) from inside an iPhone app, and parse the response? In regards to libraries - is there sufficient support in Objective-C/Cocoa to accomplish this?
On this website, they seem to be doing exactly what im asking.
Thoughts, suggestions, links would be greatly appreciated...
Yes. It is possible. There are quite a few apps that do similar things.
Slim to none. Apple hinders what languages and libraries you can develop in and run on the phone. They won't limit you based on what external data you pull in to your app.
There shouldn't be any worries here either. You shouldn't run in to security concerns and there are plenty of libraries that you should be able to utilize to make your life much easier.
Good luck!
Yes it's certainly possible, and there are json parsers available already. Secondly, based on what you just described, should the application not break any rules outside of the scope of this question, then there is no reason I can see Apple rejecting it (except perhaps content, ie., don't display any porn or the like :)) ... Finally, you haven't properly described your application to fully answer #3, and I don't dare guess at what you meant, since it may be just a waste of your time. Feel free to expand on your #3 in comments, I'll answer there.
Edit: With regard to your edit of #3 above, yeah you won't have an issue here at all either.

Pitfalls of developing for iPhone

Are there any guidelines on pitfalls to avoid while developing iPhone applications?
Sure, thousands. The same is true for any software development. Unfortunately, the easiest way to enumerate them is to write them down on a sheet of paper while waiting for a friendly soul to release you from the one you just fell into.
However:
Don't try to reinvent the wheel. The iPhone API is very complete -- you just have to LOOK for the facility you need. Things are NOT always implemented the way you would expect. Read the guides, carefully. Look at the tutorials and analyze how they work. (Try changing a line here or there in the tutorial to see what difference the change makes.) The single biggest mistake I have made in 1 year of iPhone development is not trying hard enough to find the iPhone way of doing something.
Don't ignore memory management; master it early and often. Use the Object Allocation and Leaks tools in Instruments to check for memory leaks frequently. I'd recommend checking after you complete each feature or view; more often than that if you keep finding bugs. Eventually you may understand it so well you can stop doing this.
Don't just use the default build settings. Play around with them to understand what they do. Figure out certification and distribution. GET INTO THE DEVELOPER PROGRAM QUICKLY -- it can take a while to push through that pipeline. [ AND when you get that notification that you need to renew, get it on instantly -- there have been problems with that process. ]
Don't neglect to read the Human Interface Guidelines (HIG) carefully. If they say not to do something -- DON'T DO IT. Apple will reject applications that misuse their iconography.
Don't stint on marketing. Yes, the App Store puts your app in front of millions of people... In theory. But the odds of getting front-paged are slim. There are a lot of great apps on the App Store that haven't sold much because no one knows about them.
Don't rest on your laurels. If a new technology comes out, find out if it makes your job easier; if it does, take the time to learn it. Personal example: I'm just now trying to switch from SQLite-based data management to Core Data, because I was in a hurry at the time I started my most recent project; now I wish I had slowed down and thought about it.
Don't go into your design thinking (for example) "How do I implement my concept with a table view?" It's true that table views are natural for many informational and utility applications, but don't be constrained. Instead, think about what users will want to be able to do, how you can make it easier for them -- put things together that will be used together, etc. If you've never explored the concept of Use Cases, read up on them.
Don't hesitate to build composite views. Many of the questions I have seen here on Stack Overflow have to do with putting a toolbar at the top of a table, or having an image in the background of a text field. I understand the desire to do things the easy way, and as I state in #1 above, if there is an easy way, use it. But in many cases the solution is just to layer a couple of views with appropriate placement and transparency.
Think about what might be Apple-approved from the start.
App Rejected is one of several useful sites to help understand Apple's mostly undocumented standards. (One more.) (A previous question on app store rejection reasons.)
A few quick examples:
Using a UIWebView can get your app a 17+ rating.
Coding with an undocumented/private API = rejected
Version number < 1.0 might= rejected
Not enough feedback about network success/fail = rejected
Too much network use = rejected
Clearly limited free version vs full version = rejected
The word 'iPhone' in the app name = rejected
The above links contain many more examples, and more details about those examples.
Don't neglect the programming guides. While the documentation is quite extensive, the programming guides contains a veritable trove of useful tips and "insider" information that simply cannot be gleaned from reading method definitions. I spend just as much time reading the guides for a technology (say, Core Data) as I do actually implementing it.
Don't assume you know what a method does. If you have any degree of doubt about the functionality of a method, it is well worth your time to go look it up in the documentation to verify.
Wonderful examples from #Amagrammer above.
I would love to add that the first place to start is iPhone development is Photoshop. This is still the best advice I can give to anyone who is starting out. I now use OmniGraffle because it has awesome stencil templates.
What I find is that even for super simple app's, draw up your prototype and look for usability issues and work flow issues. It is 100x quicker to redraw your app than re-code it. I have fallen into this trap numerous times and now actually draw up some pretty simple functionality to see what it will look and feel like.
This advice will save you 10s maybe even 100s of hours in hopefully getting your app right first time and getting you to think through what the issues are. Throwing away code sucks and I have done it not because the code was bad but because it made the usability or solution worse. I think the best of us end up throwing code away and prototyping your design definitely will help in having to RTFM for something you did not have to build in the first place.
If you don't have an great designer, and can't do great design by yourself, then don't even start iPhone app development. This rule only applies if you want/need to make money with your apps.