Recent

Author Topic: iPhone/PhoneGap like NSBasic  (Read 13918 times)

justapps

  • New member
  • *
  • Posts: 22
iPhone/PhoneGap like NSBasic
« on: July 19, 2011, 09:33:36 pm »
It would be cool to have  a way for Lazarus to generate Javascript/HTML5 apps and then package them into a real iOS app using PhoneGap like NSBasic is doing.  Except using Pascal instead of BASIC would be nice along with the code completion features that Lazarus offers.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: iPhone/PhoneGap like NSBasic
« Reply #1 on: July 20, 2011, 03:42:47 am »
Rather than waiting for something that will never happen, why not just start developing for iOS today? PhoneGap is a good choice if want to try to target both iOS and Android with the same JS / HTML / CSS codebase. Many PhoneGap users develop their app's UI with jQuery Mobile (http://jquerymobile.com/) or Sencha Touch (http://www.sencha.com/products/touch/). Or you could use Dashcode (http://web.me.com/macpgmr/ObjP/MacXPlatform_Part9.html).

I used to think that PhoneGap was just a niche tool, but I noticed last week that the number of registered users on the PhoneGap forum is now greater than Lazarus, even though PhoneGap forum has only been around for 3 years.

Many native mobile apps are connected to things on the Web, for example to a Web service. You can write the part that resides on a Web server in anything you want, even Pascal.

You can also write a native iOS app with Pascal if you want. Here's how:

http://web.me.com/macpgmr/ObjP/Xcode4/ObjP_Intro.html

Thanks.

-Phil

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: iPhone/PhoneGap like NSBasic
« Reply #2 on: July 20, 2011, 09:41:33 am »
It would be cool to have  a way for Lazarus to generate Javascript/HTML5 apps and then package them into a real iOS app using PhoneGap like NSBasic is doing.  Except using Pascal instead of BASIC would be nice along with the code completion features that Lazarus offers.

Why HTML5+Javascript when you can have a real native fast application developed in Objective Pascal?

See more details here: http://wiki.lazarus.freepascal.org/FPC_PasCocoa

And here: http://web.me.com/macpgmr/ObjP/Xcode4/ObjP_Intro.html

And there are also articles published about Objective Pascal in the Toolbox german magazine and in the Blaise Pascal Magazine (this one in english).

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: iPhone/PhoneGap like NSBasic
« Reply #3 on: July 20, 2011, 09:48:09 am »
Rather than waiting for something that will never happen, why not just start developing for iOS today? PhoneGap is a good choice if want to try to target both iOS and Android with the same JS / HTML / CSS codebase. Many PhoneGap users develop their app's UI with jQuery Mobile (http://jquerymobile.com/) or Sencha Touch (http://www.sencha.com/products/touch/). Or you could use Dashcode (http://web.me.com/macpgmr/ObjP/MacXPlatform_Part9.html).

I used to think that PhoneGap was just a niche tool, but I noticed last week that the number of registered users on the PhoneGap forum is now greater than Lazarus, even though PhoneGap forum has only been around for 3 years.

I am sorry to say this Phil, but you each time more resamble Rudy from the Embarcadero Forums. Rudy from the TeamB used to be a supporter of Delphi, but in the last years he hangs around in the Embarcadero Forum just to recommend people using other tools and to say how C# and Visual Studio are better then Delphi. Is that the way you are going?

touchring

  • Full Member
  • ***
  • Posts: 174
Re: iPhone/PhoneGap like NSBasic
« Reply #4 on: July 20, 2011, 12:21:14 pm »
Rather than waiting for something that will never happen, why not just start developing for iOS today? PhoneGap is a good choice if want to try to target both iOS and Android with the same JS / HTML / CSS codebase. Many PhoneGap users develop their app's UI with jQuery Mobile (http://jquerymobile.com/) or Sencha Touch (http://www.sencha.com/products/touch/). Or you could use Dashcode (http://web.me.com/macpgmr/ObjP/MacXPlatform_Part9.html).

I used to think that PhoneGap was just a niche tool, but I noticed last week that the number of registered users on the PhoneGap forum is now greater than Lazarus, even though PhoneGap forum has only been around for 3 years.

I am sorry to say this Phil, but you each time more resamble Rudy from the Embarcadero Forums. Rudy from the TeamB used to be a supporter of Delphi, but in the last years he hangs around in the Embarcadero Forum just to recommend people using other tools and to say how C# and Visual Studio are better then Delphi. Is that the way you are going?


It will be good if all of us consolidate our efforts onto a common platform instead of having competing products.

I sell software for end user, but I try to avoid having to change platforms - a new technology means that I will need to learn something new, and time is money.

There's so many competitive platforms out there for Pascal based RIA, Delphi Prism, Unigui, Morfik, Raudus (hope the spelling is right), extpascal, fcl-web.  None are really good. the market is probably fewer than 1000 users for all of them. Extpascal is not even beta.  Everyone is wasting time.
« Last Edit: July 20, 2011, 01:10:51 pm by touchring »

justapps

  • New member
  • *
  • Posts: 22
Re: iPhone/PhoneGap like NSBasic
« Reply #5 on: July 28, 2011, 08:03:31 pm »
It wasn't my intention to start an argument :)  For the average developer Objective C looks too difficult to learn.  I hate that Apple abandoned Pascal and went that route.  And Objective Pascal doesn't look much friendlier. 

I have done quite a bit of searching and found Appcelerator.  Appcelerator takes your Javascript and compiles it into native iOS and Android apps.  Now if Embarcadero could purchase them and redesign to use Pascal that would be nice.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: iPhone/PhoneGap like NSBasic
« Reply #6 on: July 28, 2011, 09:33:29 pm »
It wasn't my intention to start an argument :)  For the average developer Objective C looks too difficult to learn.  I hate that Apple abandoned Pascal and went that route.  And Objective Pascal doesn't look much friendlier. 

I have done quite a bit of searching and found Appcelerator.  Appcelerator takes your Javascript and compiles it into native iOS and Android apps.  Now if Embarcadero could purchase them and redesign to use Pascal that would be nice.

But we're not average here.

Actually, your descriptions of Appcelerator is not correct. It does not "compile" your JS. Instead, it appears to be very similar to PhoneGap, wrapping your JS, HTML and CSS source files in a native shell program that loads these files into a Webview (embedded browser). You can add compiled code to both, but only as "plugins" that you then call from your JS.

There are lots of interesting (and fairly new) mobile development tools - that's an indication of how important mobile has become and also how much fun it looks - once you target mobile, you immediately pick up GPS, accelerometer, camera, cellular connection, etc. as standard features that you can use.

Currently most mobile apps tend to be fairly "small" in scope. These cross-platform JS tools should do fine for that. Inevitably, mobile apps will tend to become much bigger in scope and they'll need to pull in large amounts of existing code, databases, etc. - that is, development will become more like conventional desktop software development. It's not clear that JS tools will be the right choice for these "larger" mobile apps where the UI begins to pale in comparison to the non-UI code.

The gold standard for an iOS app is top-level code that works directly with Cocoa Touch objects. The only way to do that currently is with Objective C or Objective Pascal. If you have existing Pascal code that you want to use, Objective Pascal is really the only choice.

Thanks.

-Phil

jwdietrich

  • Hero Member
  • *****
  • Posts: 1021
    • formatio reticularis
Re: iPhone/PhoneGap like NSBasic
« Reply #7 on: August 16, 2011, 08:30:30 pm »
It would be cool to have  a way for Lazarus to generate Javascript/HTML5 apps and then package them into a real iOS app using PhoneGap like NSBasic is doing.  Except using Pascal instead of BASIC would be nice along with the code completion features that Lazarus offers.

Did you try Morfik AppsBuilder? The FreePascal based Morfik supports the development of AJAX applications in ObjectPascal.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.2 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

avra

  • Hero Member
  • *****
  • Posts: 1569
    • Additional info
Re: iPhone/PhoneGap like NSBasic
« Reply #8 on: August 17, 2011, 03:49:47 pm »
Take a look at OP4JS (Object Pascal for Java script):
http://www.delphifeeds.com/go/f/83049?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+delphifeeds+%28DelphiFeeds.com%29
It's a new promising project that is close to what you want...
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib