Phonegap combined with native code for screen scraping app - android

I am going to develop a cross-platform app that will need some screen scraping capabilities. The app itself looks like an obvious candidate for Phonegap since the UI is quite static and simple (no fast UI interaction needed) - it is basically a kind of foreign currency comparator which needs to show some updated exchange rates and a few simple graphs.
The problem is however that it needs to connect to certain sites and grab the data from there using screen scraping. There is no API. I have many years experience with screen scraping in PHP, and some experience in native Android using jsoup. And the "app" already runs in PHP (on server) for use in browsers, but the client needs a real app.
What are my choices for screen scraping in Phonegap? I reckon that the javascript support available is not suited for screen scraping, but is it possible without too much fuss to build a native layer beneath the Phonegap app?
I have virtually no experience with Phonegap, so I might have missed some obvious solutions. If so, please advice me.
As a side question, does an equivalent of jsoup exist for IOS (objective C)?

Bobik is the very API you are looking for. It lets you tap into its cloud computing power through the API in which you only provide the urls and xpath/jquery queries. Read my article at http://zscraper.wordpress.com/2012/06/02/client-side-web-scraping/ to see Bobik in action.

Related

Intraweb HTML5 app, git and database - do they blend?

I'm on a bit of new ground here and perhaps this is a repost (if so>sorry).
I need some pointers on which direction to go. I have previously made an android app and found myself using most dev time on the UI. I wish to design the UI with HTML5 and distribute it to android and iOS .
I researched a lot about native and hybrid in order to focus my effort. Came across a bunch of platforms like PhoneGap, Appcelerator, Trigger.io and AppGyver (found the latter two appealing). But now I'm confused...
I basically wish to to make an intraweb environment that allows a team to develop HTML5 content that feeds data into a database while keeping the development and database under strict version control.
Thinking of such a setup
Local server hosting the source HTML5 code and database(s) - git upstream.
Development is then done by git on desktop computers
The mobile/tablets pulls the source (git origin) and creates instances that pull request the data entries to upstream (and thereby all other remotes)
Multiple units can work on the same instance and contribute to pull request data to the origin. They see changes right away (logic should assure no conflicts - thinking of pinging the devices)
No need to distribute new app via app stores if some new html5 is added (no behavior changed so no manifest violated).
Currently I'm considering making a native app that has a webview and performs git commands, but I'm fearing that I will get stuck (have no iOS programming experience). Is this overkill?
I'm not at all against the hybrid suppliers - just wondering if they will let me achieve what I aim for.
If anyone has some links to online tutorials on how to archive similar task or can provide usefull hints/pointers then I would appreciate it.
I'll upvote all answers that helped me and set the solution for the one that helped me most.
I worked some years with web technology packed into native apps. You have to consider two things.
First, your app will be just a simple HTML page or it will have fancy UIs, very dynamic UI interaction and animations? If it is complex and very dynamic, stick with native apps. The main advantage of them is the performance, it is VERY superior to WebView packaged apps in HTML5.
Second, the WebView have MANY usage restrictions. It is not like the Chrome browser that you use in your phone/tablet. Too fancy operations will likely have problems with WebView, and the extra time you've spent constructing UIs you will spend working around very annoying little problems.
Another concern, using git bundled in your app will be hard to integrate with the WebView due to its sandbox restrictions. I surely would not recommend to go that way. If you don't use the native phone hardware, like camera and others, you can show in the WebView a remote HTML5 site. It is a much more simple and secure option.
Another thing to note. These packing JavaScript libraries have different objectives. The Cordova (PhoneGap extends this with some Adobe powered features) goal is to make available to your JS code the native phone features, it has nothing to do with UI. The Ionic that was mentioned is focused on UI development. There are other libraries that are focused on UI and are used with PhoneGap/Cordova. My suggestion for fancy and dynamic UIs using HTML5 based technology is the Sencha Touch framework, that is bundled in ExtJS 6 now. Although they are paid framework and require advanced Javascript programming. The learning curve is very big.
Concluding, if your goal is faster UI development and the apps are simple, you can go with Cordova and another UI-focused framework. But I suggest to forget the complicated Git "on-the-fly" app update. If your app uses many native features and has very complex and big UIs, stick to native due to performance.
Another thing to note, well developed native apps consumes (in most cases) much less network bandwidth and battery lifetime.
I hope these informations help you =)
I might suggest looking into Ionic, it is a quote:
Powerful HTML5 SDK that helps you build native-feeling mobile apps using web technologies like HTML, CSS, and Javascript.
Ionic is focused mainly on the look and feel, and UI interaction of your app. That means we aren't a replacement for PhoneGap or your favorite Javascript framework. Instead, Ionic simply fits in well with these projects in order to simplify one big part of your app: the front end. We recommend reading Where does the Ionic Framework fit in? to get a good understanding of Ionic's goals.
Ionic currently requires AngularJS in order to work at its full potential. While you can still use the CSS portion of the framework, you'll miss out on powerful UI interactions, gestures, animations, and other things.
What I get from this is that Ionic integrates with PhoneGap.
I'm not sure how well this will help, but I think it will be useful in your search.
PhoneGap - Is as of yet, the single most comprehensive suite that allows you to leverage HTML, CSS and Javascript in a way that will give you the ability to have a single source solution and publish to the mobile landscape.
Using your scenario:
Create your application in local Webserver (Intranet)
Utilize the PhoneGap API to improve data access and UI.
Publish to GIT/SVN for versioning
Build with PhoneGap (Build Service - a cloud service that takes the zip of source code and then you choose your platform)
Publish as Private/Public to the Device Target (IOS, Android, WPhone)
In this way your HTML5 Application and your Published/Packaged App on the Devices you chose would be identical; and the WebApp and DeviceApp will remain in synch.
Useful PhoneGap Tutorials:
PhoneGap Tutorial 1
PhoneGap Tutorial 2

Suggestion for using web framework for mobile app & desktop

I am involved in developing application for mobile sensors, data from these sensors is to be collected using Android/iOS mobile apps. We want the end users to be able to view this data from desktops also. This data is uploaded to be uploaded to our own database(s) from the mobile apps. I have done this development of the prototypes using native applications (iOS/Android) and implemented web services using Django 1.6 with SQL database. This was just for prototype.
We are at stage where we really need to make this into real product with paying customers, so we are in position to revisit our technology stack question. So I am looking for suggestions.
Currently I am thinking of using Play Framework on the server side. I really haven't seen anything compelling that can provide Native app like feel so we will have to keep developing mobile apps using native libraries. We will interface with our web services using REST API. My concern with Play framework is it doesn't seem to have lot of plugins similar to django, but its early days hoping that situation will improve.
Is this right approach we are very small team ( 4 people, we can hire 2 more probably). Given this is this right technology path I am choosing anything I should be looking at?
I have looked at Parse library but doesn't seem to offer too much data flexibility, geared towards more social media aspects.
We will be using StromPath for user management, any other choices I should be looking at for user management?
We really don't want to do a lot of MVC programming on client side, so on desktop app we will keep it simple jQuery/Javascript & html
-Sam
With jQuery mobile you can assure the look and feel like in a native app. The library it self does media queries and stretch or shrink the content accordingly. So in terms of UI you will not face any problem providing native app like look and feel to the users. For client/server communication I recommend normal ajax functionality so you can dynamically add content.
When working with JQM there are certain rules that you will have to obey.

Twitter Bootstrap - Is it sufficient to build mobile web app?

I am planning to consider to use the Bootstrap framework for one of my clients especially because of its Responsive nature as the app has to work on Smart Phone as well as Tabs (of different screen sizes).
In general, do we face any issues with Bootstrap? Is it right decision to depend completely on the Twitter Bootstrap and Backbone together to develop a web app?
At my company we tend to use Twitter Bootstrap for rapid prototyping web app ideas. However most clients will want a bespoke look and feel at some point so we tend to code up our own interfaces then.
That said I know thousands of sites that use bootstrap without any issue so I would say it comes down to whether you client will be happy with the visual restrictions bootstrap gives you.

Mobile game made as website, used in app

I'm thinking about making a mobile game (say something like Wordfeud).
Now I would like to publish this game on Android, iOS, WindowsPhone, facebook and normal browser.
I could go native on all these platforms.
BUT
Since a want it to be a multiplayer game, most of the functionality will be done via a c#.NET webservice with SOAP calls or something.
Now for another project i'm make a mobile website working in WebView (android) and the same website already works in an IOS app.
So.. why not make a jQuery/HTML5/.NET mobile website and some small apps just as a shell to get them in the marketplaces. That way everything will be in one place and updates/bugfixes will be a walk in the park.
What do you think?
Cheers
If you check the Apple Review Guidelines, you could see :
Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected
You will be able to launch your android one, but you may have your iOS web bundle rejected.
I suggest to have a look to this page before posting to the app store
I think there are a lot of problems with this. If you look at tools that try too help you do this kind of thing, the most powerful ones being Google PlayN and Monkey. There are still a lot of semantic differences between a HTML/Flash/SilverLight game and a Mobile one, The most obvious being differences in input devices and screen resolution sizes.
It's also important to realize that the cost of integrating the different platforms (ie facebook vs. non-facbook, depending on what type of game you're making) may be significant.
Google PlayN: http://code.google.com/p/playn/
Monkey: http://www.monkeycoder.co.nz/
I think that there are 3 things I always see in html5 apps :
-very bad integration to the different platforms
-bad performances, web based is way slower than native.
-nightmare to maintain.
I strongly encourage you to go the native way if you want to do a quality app.
HTML5 is not all wrong. I think it is the right choice if there are big time/budget constraints and/or you don't care about the quality of the app (for exemple if it will be only used internally).
Final thought : why SOAP ?? REST is faster and is not harder to implement.

Do I need to know web application development to make mobile apps? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
So I am looking to learn both web application development and mobile app development, and I was wondering is there is an overlap between the two. More specifically, is the knowledge of developing web apps essential or even helpful when building mobile apps?
I was under the impression that one had to know basic web app development first (at least server side programming) before being able to develop mobile apps that use the internet (since I assumed a mobile app is just a different client side that would ultimately have to talk to a web application on a server somewhere). However, Googling this brings up discussions about mobile web apps vs. native mobile apps, and this has me confused (for example is Shazaam a native or a web app?).
Please help me understand.
A native app is an app that execute on your mobile.
A web app is an app that open a webPage inside your mobile app and act like a classic web browser.
You don't have to know web dev to do mobile dev, but it can help, programming is the same for every platform, you just have to know new language every time you change, but principles are the same.
Knowledge of developing web application isn't necessary for developing mobile application. But, It will help you a lot. You can also build mobile app with HTML5,CSS & JavaScript.
It depends.
You can develop mobile apps which do not need any web components at all.
I see at least two big issues which make web development extremely useful for mobile apps
You could develop non native mobile app based on web technology. Using jQuery mobile or GWT (or other framework) will support platform independence for you apps. The back-draw is this application could not use all features of the mobile device (e.g. camera), and they will in general have less performance and battery/power efficiency.
I find it very natural to use cloud techniques in combination with mobile. You could use the web to save and share data. And this allows you to build application driven by mobile AND desktop (desktop is much more efficient when it comes to data input)
I would recommend to look at web technology, too.
Sooner or later, your mobile application would need to talk to a a server to do something useful - the phone is the thin-client (relatively speaking). So yes, usually, you would use a server side language (like PHP or RoR) to build some kind of API for your mobile application to talk to and be useful.
For example, since you bought up Shazaam (which is a native application): Shazaam would record a few seconds of music using and then uploads to a web service that does all the heavy lifting of sampling the recorded music and looking it up on a (what I would imagine) giant DB of music for the 'signature' of that music and sending the identified song back to the phone so it can be presented to the user. Somewhere along the way, there is server side code that does this.
I've worked at companies when mobile app development as just starting to take off (2008-09) where there were guys who only coded Java for Android/Blackberry or Objective-C for iOS and didn't know jack about what happens in the backend. For that, they talked the server-side guys who wrote JSP or python to build the APIs their native code would talk to.
There are servics Parse that would allow you do build a "backend" for your mobile application without needing worry about getting your own server or writing server side code. Useful for certain classes of applications.
I hope that all makes sense. There is definitely an overlap between web development (as in server side) and mobile development (native code on the mobile). Learn both, specialize in one if you have to.
You can start learning Mobile App Development without any prior knowledge of Web/Enterprise Application Development.
But, it would definitely make your job easier if you do have that knowledge. You need to know the basics of RESTServices (cause this is mainly how you would interact with a Server from the Mobile App), know how HTTP POST, GET, DELETE,etc work. Also experience with MySQL or SQL whill help your for using SQLite(which is basically your DB on mobile apps). Also if you have some knoledge about ORMs such as Hibernate, may also help you in your mobile app, if you have a large model, and a large data structure that you cache on your device, and it would allow you to use ORMLite(on Android for example).
Definitely all this things will help you a lot, and any other experience regarding programming standards/ design patterns/ Java/ Objective-C will make your work easier, and your developed products more reliable/stable.
Good luck.
A web app is a website (sometimes but not always aimed at a mobile device) using a different set to technologies/languages (php/perl/.net/xhtml/ccs etc) than native app development (obj c, c++, java).
Yes it's useful to have some knowledge of both, but if I was you I would concentrate on one path (one thing at once) either server/back-end/web-app/web-site building or mobile development. I worked over 10 years in a web software development environment before deciding to move to mobile app development. Now I do no web coding, I use existing web-services or work with someone else who does the web-services side of things.
It also depends what types of apps you want to build. If you want to write games for mobile devices then you don't need to learn any web stuff. Use Apple' Game Center for the leader boards etc.
Even if you want to write mobile apps that communicate with web services, I suggest writing a few apps that consume existing web-services first, so you can concentrate on building something that works without trying to learn more than one programming language at once. There are plenty of web-sites out there with web-services you can use to create your own apps.
There are options out there for writing apps using web technologies (phoneGap, titanium etc.) but I would avoid them personally.
Well, basic knowledge on web applications is very useful. After all, as you said, a mobile app is just another type of client. Knowing the principles of web communications is essential. The server side of an application is quite the same. As far as the client side is concerned, transferring your code from java to android is quite easy...!
I think it is upto how you want to build you mobile app. If your app can do something locally, then there is no need to know web programming. But if your app wants to communicate with server, or wants to use web stuff (such as rendering the HTML5 and javascript), then you'd better know web programming. Both native and web app can do the thing, but different pros and cons. There are also platforms that helps you develop the mobile app using html and js then turn it to native code such as titanium.
IMHO, the processing of mobile app should be done on server if possible. In that way, the app can do more and is more efficient. Therefore, knowing web app development will be a big plus.

Categories

Resources