Categories
Android iOS Mobile REST

REST Client Video Challenge

Yesterday, I mentioned I built a REST client and deployed it to iOS and Android inside 5 minutes. Someone asked me to make a video actually showing how it was done. So here it is showing a simple REST client built and deployed to iOS 9.1 and Android 6.0 Marshmallow.

Since I am using SpitCast, and it doesn’t offer an encrypted endpoint for its REST service, I had to modify the Info.plist to allow that on iOS 9.

Could I do it faster without the video recording and explanation? Yes, but I think you get the idea. Delphi makes building multiplatform REST clients really, really easy.

I’m curious to see someone create a client app using other general purpose development tools to connect to a REST service and too see how long that takes.

If I wanted to connect to a different end point to pull down more information on an individual surf spot I could that by handling the OnItemClick event for the List View.

If there is interest I’m happy to share my Sync-Timer source code.

Categories
REST Tools

Delphi and REST Client Development

I really don’t like to make comparison between different development tools. In my opinion most tools have their strengths for certain tasks. So I try not to criticize other tools by name. Delphi is my favorite, and I believe it is the best all around tool for more projects I face. Occasionally I have someone ask me how Delphi compares to another tool they are evaluating. I thought I would share one such experience.

When I was in Brazil I went to meet with a guy who was in charge of software development for a large, international company. They were all standardized on a different development tool, but it didn’t really have a mobile solution. They were looking at some tools that claimed to make it really easy to do mobile development, but once he got past the marketing he found it wasn’t all it was cracked up to be.

To evaluate the tool he decided he would develop a simple little app for iPhone and Android that connected to a REST server to pull down a list of countries, cities, etc. to help people find offices for his company. He thought that a week should be more then enough time to develop this simple application.

What he found was that while he expected it to be cross platform, it was actually only shared code. So he had to create a project for each platform, and then he could share part of the code (not as much as he would like) between each project. Also there was significant overhead in consuming a REST service. After a couple days he realized a week wasn’t enough time for even one platform.

To top it all off he discovered that the cost was actually way more then it was initially made out to be when you actually got down to doing something serious.

So I showed him Delphi and told him that the app he was describing could be done inside a day, probably with a prototype within an hour. He found that a little hard to believe, so I created a simple REST client displaying the result of a REST service and deployed it to my Android phone. It took about 5 minutes, including the time it took to connect to his WiFi.

He was so impressed he actually got his phone out to make a video of it just so he could show his boss, who he was sure wouldn’t believe him.

That is what I love about Delphi. It makes the simple things that you need to do all the time so simple and so quick, and it makes everything else still pretty simple. Need an API that isn’t wrapped in a component or the RTL, no problem, you can still access it.

Categories
Android Conferences

Android Services Presentations and Workarounds

Another round up of Android Service related resources.

For starters here are my slides from my Android Services presentation in Brazil.

Creating Android Services with Delphi and RAD Studio 10 Seattle from Jim McKeeth

You can also download the Workarounds and fixes for the Java templates and Android Manifest from CodeCentral.

You can catch a replay of Julian Mesa’s session from CodeRage X

And check out my other Android Services posts.

Categories
Conferences

T-Shirts from Brazil Delphi Conference

I picked up some great T-Shirts during my visit to Brazil.

Delphi Developer: The evolution of mankind
Delphi Developer: The evolution of mankind

I really like this one as the Delphi Developer is the highest evolved form of developer. This is evident by not only their great taste in development tools, but also by the fact they are incredibly productive and produce great apps for all the platforms.

Aquasoft - coffeed powered developer
Aquasoft warns: This shirt contains a Delphi Developer. To run it, please fill with coffee and press F9.

I’ll take some Guaraná Antarctica instead of coffee though. Just not sure where my F9 key is located. Carlos from Aquasoft showed me a very cool ORM he is working on. Hopefully we will see some more of that in the near future.

Windows, Apple, Android = Delphi
Windows, Apple, Android = Delphi Developer

I love that Windows, Apple and Android are all following the Delphi Developer.

TDevRocks
www.TDevRocks.com.br

TDevRocks is a great blog by MVP Adriano Santos.

Categories
gadgets

Connecting the Philips Hue Bridge to Wi-Fi

philips-hue-bridgeI needed to connect my Philips Hue Bridge to Wi-Fi to use it for a presentation at a conference in Brazil. Most public Wi-Fi networks segments each connection preventing communication between devices, besides the fact the Hue Bridge is Ethernet only (Not sure who at Phillips made that decision). Luckily I was able to come up with a solution.

All I needed was my MacBook Pro, which was connected to the conference WiFi and a Thunderbolt Ethernet adapter (which I always carry just incase there is wired Internet access).

Connect the Hue to the MacBook via the Thunderbolt adapter. Then under System Preferences -> Sharing. Select Internet Sharing. Connect from Wi-Fi to computers using Thunderbolt Ethernet (I usually have sharing set the otherway around). Then activate Internet Sharing (and verify you want to do it).

Sharing WiFi to Thunderbolt

This granted the Bridge access to the internet, and gave it a 192.x.x.x IP address that I could reach from my MacBook Pro (and the VM) to send commands to the bridge. This worked great for my presentation, but isn’t a solution for home connectivity.

Also, it turns out the Philips Hue Bridge I just purchased is now obsolete thanks to an Apple HomeKit requirement.

Categories
DataBase Source Code

New Delphi Seattle MongoDB Sample

I created some more Delphi 10 Seattle samples to show off MongoDB and FireDAC functionality: LocalSQL, Indexing & Geospatial.

FireDAC MongoDB NoSQL

The first one queries some data from MongoDB allowing you to specify the match, sort and projection, then it stores the results in a DataSet. At that point you can use LocalSQL to write a SQL query against the result set. While FireDAC gives you full native support for MongoDB, it also puts the SQL back into NoSQL.

MongoDB FireDAC LocalSQL

Indexing is used to improve your query performance. It is really easy to work with MongoDB queries with FireDAC.

MongoDB FireDAC Indexes

And one of the cool features of MongoDB is that you can do spatial queries. Here is an example that shows how to create a Spatial index and then do a spatial query with FireDAC. This uses the restaurant data that is included with the shipping samples, so make sure you load the restaurant data first.

Geospatial MongoDB FireDAC

If you missed my previous post I had a MongoDB FireDAC and C++Builder sample.

[You can download my new samples here.]

Categories
News

More Coding In Delphi in More Formats

More Coding in Delphi by Nick HodgesFor everyone who updated to Delphi or RAD Studio 10 Seattle, you get a free copy of Nick Hodges new book More Coding in Delphi (At least if you update before the special offer runs out.) Just yesterday this was updated to include the book in ePub and Mobi format, in addition to the PDF version. This is great if you have a Kindle (Mobi) or other eReader (ePub) since these formats are more flexible.

So Upgrade to RAD Studio 10 Seattle today and download More Coding in Delphi by Nick Hodges and load it on your favorite eReader. Then buy a print copy too, because those are easier to get autographed.