Delphi Prism | Andreano Lanusse | Technology and Software Development Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos Fri, 05 Oct 2012 01:30:48 +0000 en hourly 1 https://wordpress.org/?v=6.3.4 Delphi XE3, C++Builder XE3, Prism XE3 and HTML5 Builder is coming!!! http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/ http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/#comments Wed, 15 Aug 2012 08:02:41 +0000 http://www.andreanolanusse.com/en/?p=854 Embarcadero just announced RAD Studio XE3 World Tour, which will show the new versions of Delphi, C++Builder, Prism and the  “new” HTML5 Builder. This new version will bring some new features related with the new Windows 8 UI, which Microsoft called Metro and will call something else as they release Windows 8, FireMonkey and others stuffs […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Embarcadero just announced RAD Studio XE3 World Tour, which will show the new versions of Delphi, C++Builder, Prism and the  “new” HTML5 Builder.

This new version will bring some new features related with the new Windows 8 UI, which Microsoft called Metro and will call something else as they release Windows 8, FireMonkey and others stuffs that will be announced later.

I will be posting my thoughts about this new version as soon Embarcadero release that. This is going to be my first independent and imparcial review about a new version since I left Embarcadero, stay tuned.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/feed/ 5
Bye Bye Embarcadero!!! http://www.andreanolanusse.com/en/bye-bye-embarcadero/ http://www.andreanolanusse.com/en/bye-bye-embarcadero/#comments Tue, 01 May 2012 21:01:16 +0000 http://www.andreanolanusse.com/en/?p=839 Dear developers, My Borland history began in Brazil on December of 1995, had so many chapters (Borland/Inprise/CodeGear/Embarcadero), a new and important chapter started in December of 2006 when I moved to the United States and today this chapter comes to an end. Today is my last day at Embarcadero Technologies. I would like to thank […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Dear developers,

My Borland history began in Brazil on December of 1995, had so many chapters (Borland/Inprise/CodeGear/Embarcadero), a new and important chapter started in December of 2006 when I moved to the United States and today this chapter comes to an end. Today is my last day at Embarcadero Technologies.

I would like to thank all of you around the world for the great time we shared together during all of this years, for all the conversations face-to-face, online, by email or phone. I have been your advocate during all of this years was something unique and enjoyable, something I will always take with me.

The 17 years of Delphi was only possible because of the support of this energetic community, keep sending your feedbacks to Embarcadero, specially now with FireMonkey, which has a long way to go.

This blog will continue and software development will continue to be the predominant topic here. My videos on YouTube will continue and I expected to publish other videos as well. Finally you can continue or start following me on Twitter @andreanolanusse

I will be around and you can contact me here or via e-mail andreano AT gmail DOT com

Now is time to start writing the next chapter and look for new opportunities, that I expect to be challenging and fun.

Sincerely,

Andreano Lanusse

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/bye-bye-embarcadero/feed/ 37
RAD Studio XE2 a new era for Delphi and C++Builder Developers http://www.andreanolanusse.com/en/rad-studio-xe2-a-new-era-for-delphi-and-cbuilder-developers/ http://www.andreanolanusse.com/en/rad-studio-xe2-a-new-era-for-delphi-and-cbuilder-developers/#comments Tue, 02 Aug 2011 08:32:40 +0000 http://www.andreanolanusse.com/en/?p=668 RAD Studio XE2 is coming and together comes the XE2 release for Delphi, C++Builder, RadPHP and Prism, in order to show all of the great features coming, this week we are starting the RAD Studio XE2 World Tour, you can check the list of countries part of the World Tour and make your registration. This […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
RAD Studio XE2 is coming and together comes the XE2 release for Delphi, C++Builder, RadPHP and Prism, in order to show all of the great features coming, this week we are starting the RAD Studio XE2 World Tour, you can check the list of countries part of the World Tour and make your registration.

This release represents a new era for Delphi and C++Builder developers, there are lot of new stuffs on this release and we will show all of them during the RAD Studio XE Tour, in the mean time I would like to highlight some of them:

[ilink style=”tick”]New Delphi for 64-bit Windows and full VCL/RTL support[/ilink]
[ilink style=”tick”]Full monitoring and controlling of DataSnap connections[/ilink]
[ilink style=”tick”]LiveBinding, the new mechanism for binding any type of data[/ilink]
[ilink style=”tick”]dbExpress ODBC driver[/ilink]
[ilink style=”tick”]Cloud API support for Amazon S3[/ilink]
[ilink style=”tick”]VCL Styles to modernize the look and feel of VCL applications[/ilink]
[ilink style=”tick”]FireMonkey the new platform for NATIVE software development[/ilink]

FireMonkey is a big step forward, it opens a whole new market for Delphi and C++Builder developers, allowing to offer their current applications on Mac, develop new products and at the end deploy their applications through App Store reaching millions of end users. The power of FireMonkey will distinguish your applications from any other.

Much more to come, stay tuned to this blog, other Embarcadero blogs and our Embarcadero website throughout this month for more information.

[button link=”http://www.embarcadero.com/world-tour” size=”large” style=”note” color=”red” border=”white” text=”light” window=”yes”]Register today for the RAD Studio XE2 World Tour[/button]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/rad-studio-xe2-a-new-era-for-delphi-and-cbuilder-developers/feed/ 7
Using iOS MapKit and CoreLocation with Delphi Prism and MonoTouch http://www.andreanolanusse.com/en/using-ios-mapkit-and-corelocation-with-delphi-prism-and-monotouch/ http://www.andreanolanusse.com/en/using-ios-mapkit-and-corelocation-with-delphi-prism-and-monotouch/#comments Mon, 27 Dec 2010 22:40:05 +0000 http://www.andreanolanusse.com/en/?p=418 The iPhone Maps application is one of the most useful app for me, we always used this app to track a direction, check the traffic, search for a restaurant, gas station, etc. In this post I will show how to use the MapKit and CoreLocation framework from iOS SDK, both enable mapping related functionality within […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
The iPhone Maps application is one of the most useful app for me, we always used this app to track a direction, check the traffic, search for a restaurant, gas station, etc. In this post I will show how to use the MapKit and CoreLocation framework from iOS SDK, both enable mapping related functionality within you application.

The MapKit provide a visual presentation of geographic information using Google Maps data and image, using the MKMapView control, the same use in the iPhone Maps app. The MapKit framework is exposed on MonoTouch via the MonoTouch.MapKit namespace.

CoreLocation works on a number of iOS devices using a variety of technologies to determine position, and using a built-in compass of newer devices provides the heading the device is pointing to. Using this information you can determine where users are and what direction their device is facing, and by monitoring changes to that data how fast they are moving and how far they have traveled. The CoreLocation framework is exposed on MonoTouch via the MonoTouch.CoreLocation namespace, and deal with two types of information: Location and Heading.

I’m assuming you already watch my introductory presentation about iPhone which I explain how to create a simple Web browser using Mono IDE and Interface Builder, on this post I will just go through the implementation.

In order to use MKMapView you just need to drag and drop the control in your window using Interface Builder, also the Segmented Control which will allow you to change the Map type (Standard, Hybrid, Satellite).

Based on the address informed I will add a PIN on the correspondent location, to do add PIN markers to the map requires creating and adding MKAnnotations to the MKMapView. MKAnnotation is a abstract class and need to be implemented in your application, like the code bellow.

	  MyAnnotation nested in AppDelegate = public class(MKAnnotation)
	  private
	    _coordinate: CLLocationCoordinate2D;
	    _title: System.String;
	    _subtitle: System.String;
	  public
	    property Coordinate : CLLocationCoordinate2D read _coordinate write _coordinate;override;
	    property Title: System.String read _title; override;
	    property Subtitle: System.String read _subtitle; override;
     	    // The custom constructor is required to pass the values to this class,
	    // because in the MKAnnotation base the properties are read-only
	    constructor (l: CLLocationCoordinate2D; t: System.String; s: System.String);

	  end;

Now I had to implement the Search Bar delegate to handle events that it generates, it’s not a full implementation of the UISearchDelegate but it implement what is necessary to implement the search behavior.

The Search button will retrieve the latitude/longitude from Google’s web service and add a pin to the map using the MyAnnotation class. Remember you need to sign up a Google Maps key at http://code.google.com/apis/maps/signup.html to use this application, assigned the Google Maps Key to the variable GoogleMapsKey.

	  MySearchBarDelegate nested in AppDelegate = public class(UISearchBarDelegate)
	  private
	    app: AppDelegate;
	    lastResult: MyAnnotation;
	    GoogleMapsKey:String := String.Empty; // Define you google maps key here.
            // Keep a reference to the application so we can access the UIControls.
	   // This needs to be an internal class to access those (private) controls.
	  public
	    constructor (a: AppDelegate);
		// Method for the searchbar to call when the user wants to search,
		// where we create and call the Geocoder class. Note that we are
		// calling it synchronously which is undesirable in a "real"
		// application.
	    method SearchButtonClicked(searchBar: UISearchBar); override;
	  end;

method AppDelegate.MySearchBarDelegate.SearchButtonClicked(searchBar: UISearchBar);
begin

  var g := new Geocoder(GoogleMapsKey);
  var location: CLLocationCoordinate2D;
  searchBar.ResignFirstResponder;
  UIApplication.SharedApplication.NetworkActivityIndicatorVisible := true;

  // synchronous webservice call
  if g.Locate(searchBar.Text, out location) then begin
    if lastResult <> nil then
    begin
      // if there is already a pin on the map, remove it
      app.Map.RemoveAnnotation(lastResult)
    end;

    app.Map.SetCenterCoordinate(location, true);
    var pin := new MyAnnotation(location, searchBar.Text, location.Latitude.ToString + ',' + location.Longitude.ToString);
    app.Map.AddAnnotationObject(pin);
    lastResult := pin;
  end
  else
  begin
    // display a message that the webservice call didn't work
    using alert := new UIAlertView('Not found', 'No match found for ' + searchBar.Text, nil, 'OK', nil) do
    begin
      alert.Show()
    end
  end;
  UIApplication.SharedApplication.NetworkActivityIndicatorVisible := false;
end;

To finalized here the implementation of the Geo code using Google web services, just passing the address and Google will retrieve the latitude/longitude.

interface

uses
  System,
  System.Xml,
  System.IO,
  System.Net,
  MonoTouch.CoreLocation;

// Documentation for the service http://code.google.com/apis/maps/documentation/geocoding/
type
  Geocoder = public class
  public
    constructor (key: System.String);
    // Sign up for a Google Maps key http://code.google.com/apis/maps/signup.html
  private
    var _GoogleMapsKey: System.String;
    var xmlString: System.String := '';
  public
    method Locate(query: System.String; out return: CLLocationCoordinate2D): System.Boolean;
  private
    // Retrieve a Url via WebClient
    class method GetUrl(url: System.String): System.String;
  end;

implementation

constructor Geocoder(key: System.String);
begin
  _GoogleMapsKey := key;
end;

method Geocoder.Locate(query: System.String; out return: CLLocationCoordinate2D): System.Boolean;
var
  url: System.String := 'http://maps.google.com/maps/geo?q={0}&output=xml&key=' + _GoogleMapsKey;
  coords: XmlNode := nil;
  xd: XmlDocument;
  xnm: XmlNamespaceManager;
  gl: System.String;
  coordinateArray: array of System.String;
begin

  url := String.Format(url, query);
  return := new CLLocationCoordinate2D(0, 0);

  try
    xmlString := GetUrl(url);
    xd := new XmlDocument();
    xd.LoadXml(xmlString);
    xnm := new XmlNamespaceManager(xd.NameTable);
    coords := xd.GetElementsByTagName('coordinates')[0]
  except 

  end;

  if coords <> nil then begin
     coordinateArray := coords.InnerText.Split(',');

     if coordinateArray.Length >= 2 then begin
        gl := Convert.ToDouble(coordinateArray[1].ToString()).ToString + ',' + Convert.ToDouble(coordinateArray[0].ToString());

      return := new CLLocationCoordinate2D(Convert.ToDouble(coordinateArray[1].ToString()),
                                            Convert.ToDouble(coordinateArray[0].ToString()));
      exit true
     end
  end;

  exit false
end;

class method Geocoder.GetUrl(url: System.String): System.String;
var
  return: System.String := System.String.Empty;
  client: System.Net.WebClient := new WebClient();
begin

  using strm: Stream := client.OpenRead(url) do
  begin
    var sr: StreamReader := new StreamReader(strm);
    return := sr.ReadToEnd()
  end;

  exit return;
end;

end.

When we run the application we can have three different views of the Map, the pin (in red) is the location of our office here in Scotts Valley.

The source code is available at CodeCentral.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/using-ios-mapkit-and-corelocation-with-delphi-prism-and-monotouch/feed/ 7
Video: Building .NET based applications for Linux and iPhone with Mono and Monotouch http://www.andreanolanusse.com/en/video-building-net-based-applications-for-linux-and-iphone-with-mono-and-monotouch/ http://www.andreanolanusse.com/en/video-building-net-based-applications-for-linux-and-iphone-with-mono-and-monotouch/#comments Mon, 29 Nov 2010 19:25:25 +0000 http://www.andreanolanusse.com/en/?p=406 If you didn’t have a chance to watch my CodeRage 5 session “Building Managed Code Cross Platform Applications with Delphi Prism” the reply is available. During this presentation I introduce Mono and Monotouch frameworks and how you can use Delphi Prism integrated to Visual Studio 2010 to create .NET Web Services and ASP.NET applications and deploy […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
If you didn’t have a chance to watch my CodeRage 5 session Building Managed Code Cross Platform Applications with Delphi Prism” the reply is available. During this presentation I introduce Mono and Monotouch frameworks and how you can use Delphi Prism integrated to Visual Studio 2010 to create .NET Web Services and ASP.NET applications and deploy on Linux, as well the Mono IDE integrated with Delphi Prism on Mac to create iPhone/iPad applications.


The Web browser source code sample is available here

Watch more CodeRage replay videos

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/video-building-net-based-applications-for-linux-and-iphone-with-mono-and-monotouch/feed/ 7
New iPhone/iPad Project and File Templates for Delphi Prism http://www.andreanolanusse.com/en/new-iphoneipad-project-and-file-templates-for-delphi-prism/ http://www.andreanolanusse.com/en/new-iphoneipad-project-and-file-templates-for-delphi-prism/#comments Thu, 04 Nov 2010 18:55:52 +0000 http://www.andreanolanusse.com/en/?p=393 Yesterday our partner RemObjects released a add-in for Delphi Prism, this add-in brings a new project templates for iPhone and iPad development with Mono IDE, as well it’s include new MonoMac template. This add-in only applies for Mono IDE since it is related with MonoTouch and MonoMac. Here some of the new project templates available: […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Yesterday our partner RemObjects released a add-in for Delphi Prism, this add-in brings a new project templates for iPhone and iPad development with Mono IDE, as well it’s include new MonoMac template. This add-in only applies for Mono IDE since it is related with MonoTouch and MonoMac.

Here some of the new project templates available:

  • iPhone Navigation-based Project
  • iPhone OpenGL Project
  • iPhone Utility Project
  • iPad Window-based Project

Also, after your project create you will see some new templates using the option File –> New File

  • iPad View
  • iPad View with Controller
  • iPhone View
  • iPhone View Controller

Update instructions:

  • Select the Tools|Add-In Manager menu item in the MonoDevelop IDE.
  • In the dialog that opens, click the Repositories button, then select Add and add the URL https://secure.remobjects.com/api/monodevelop/mac/.. (You only need to do this once, and this will give you access to all future add-ons).
  • Once the repository is registered, click the Install Add-Ins… button – you will find the new templates under the Templates section.

That is it.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/new-iphoneipad-project-and-file-templates-for-delphi-prism/feed/ 2
CodeRage 5 – Build .NET applications for iPhone and Linux with Delphi Prism http://www.andreanolanusse.com/en/coderage-5-build-net-applications-for-iphone-and-linux-with-delphi-prism/ http://www.andreanolanusse.com/en/coderage-5-build-net-applications-for-iphone-and-linux-with-delphi-prism/#respond Tue, 05 Oct 2010 10:00:53 +0000 http://www.andreanolanusse.com/en/?p=382 Today I will be at CodeRage presenting “Building Managed Code Cross Platform Applications with Delphi Prism”, it starts at 3:00pm (PST). On this session I will be talking about Delphi Prism and .NET development using Novell’s Mono and MonoTouch Framework. I will explain the requirements to start using Mono and MonoTouch, what kind of support […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Today I will be at CodeRage presenting “Building Managed Code Cross Platform Applications with Delphi Prism”, it starts at 3:00pm (PST).

On this session I will be talking about Delphi Prism and .NET development using Novell’s Mono and MonoTouch Framework. I will explain the requirements to start using Mono and MonoTouch, what kind of support they provide, how works the architecture and more.

As well I will cover development and deployment on Linux of ASP.NET and .NET WebServices using Mono and Delphi Prism IDE, also iPhone development through MonoTouch and Mono IDE integrated with Delphi Prism.

My session only starts at 3:00pm (PST) but CodeRage starts at 5:00AM (PST), check the agenda and have fun!!!

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/coderage-5-build-net-applications-for-iphone-and-linux-with-delphi-prism/feed/ 0
Don’t worry you can write Delphi Prism applications for iPhone/iPad http://www.andreanolanusse.com/en/dont-worry-you-can-write-delphi-prism-applications-for-iphoneipad/ http://www.andreanolanusse.com/en/dont-worry-you-can-write-delphi-prism-applications-for-iphoneipad/#comments Thu, 09 Sep 2010 22:30:02 +0000 http://www.andreanolanusse.com/en/?p=352 Many of you didn’t want to take the risk to write iOS applications based on monotouch because of the Apple iOS 4 license agreement, now it changes, today Apple announced to “relax all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code”. In […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Many of you didn’t want to take the risk to write iOS applications based on monotouch because of the Apple iOS 4 license agreement, now it changes, today Apple announced to “relax all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code”.

In other words start development your iOS applications and make some money.

Apple you provide a new reviewer guidelines, explaining what is allowed and what is not before you start build applications.

That’s a great news, days ago I published an article about iPhone development take a look.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/dont-worry-you-can-write-delphi-prism-applications-for-iphoneipad/feed/ 9
Available now the new Delphi XE, C++Builder XE, Delphi Prism XE and RadPHP XE http://www.andreanolanusse.com/en/available-now-the-new-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/ http://www.andreanolanusse.com/en/available-now-the-new-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/#respond Tue, 31 Aug 2010 05:19:51 +0000 http://www.andreanolanusse.com/en/?p=338 It is time to start looking the new RAD Studio XE which includes Delphi XE, C++Builder XE, Delphi Prism XE and the new RadPHP EXE. All products information are now available, as well the trial editions. Take a look on the Ultimate RAD Studio XE Upgrade, you can get all Embarcadero products and improve your […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>

It is time to start looking the new RAD Studio XE which includes Delphi XE, C++Builder XE, Delphi Prism XE and the new RadPHP EXE.

All products information are now available, as well the trial editions. Take a look on the Ultimate RAD Studio XE Upgrade, you can get all Embarcadero products and improve your software and database development.

All Embarcadero Evangelist will be travelling around the world to show you the best RAD Studio release, save some time to attend the events.

Personally during the next 2 weeks I will be in USA and Latin America. I will be in the follow cities:

  • September 1- 7:00pm-9:00pm – Orange Co., CA
  • September 2 – 7:00pm-9:00pm – Los Angeles, CA
  • September 7 8:30am – 1:00pm – Mexico D.F., MX
  • September 9 – 8:30am – 1:00pm – Guadalajara, MX
  • September 21 – 5:00pm – 7:00pm – Denver, CO
  • September 22 – 6:00pm – 8:00pm – Salt Lake City, UT

In the mean time, download the trial and start looking the great new features for Delphi, C++Builder, Delphi Prism and RadPHP.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/available-now-the-new-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/feed/ 0
DataSnap XE and Windows Azure – RAD Studio XE Preview #3 http://www.andreanolanusse.com/en/datasnap-xe-and-windows-azure-rad-studio-xe-preview-3/ http://www.andreanolanusse.com/en/datasnap-xe-and-windows-azure-rad-studio-xe-preview-3/#respond Tue, 24 Aug 2010 22:39:30 +0000 http://www.andreanolanusse.com/en/?p=336 One of the great news around RAD Studio XE is the Cloud support, in this video we show how to access Microsoft Azure through the DataSnap Server XE, as well some of the new features in DataSnap like authentication and authorization to execute the server methods. Now take some time and visit the  RAD Studio XE […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
One of the great news around RAD Studio XE is the Cloud support, in this video we show how to access Microsoft Azure through the DataSnap Server XE, as well some of the new features in DataSnap like authentication and authorization to execute the server methods.

Now take some time and visit the  RAD Studio XE Preview to learn more about the new Delphi XE, C++Builder XE, Delphi Prism XE and RadPHP XE.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/datasnap-xe-and-windows-azure-rad-studio-xe-preview-3/feed/ 0
Agile Development = Delphi XE + C++Builder XE + Delphi Prism XE + RadPHP XE http://www.andreanolanusse.com/en/agile-development-delphi-xe-cbuilder-xe-delphi-prism-xe-radphp-xe/ http://www.andreanolanusse.com/en/agile-development-delphi-xe-cbuilder-xe-delphi-prism-xe-radphp-xe/#comments Tue, 17 Aug 2010 17:20:54 +0000 http://www.andreanolanusse.com/en/?p=333 Today we published the second RAD Studio XE Preview video, which include the new version of Delphi, C++Builder, Delphi Prism and RadPHP (formaly Delphi for PHP), this video  will demonstrate how you can accelerate your development process and improve the quality of your applications using some great third party tools included in RAD Studio XE. […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Today we published the second RAD Studio XE Preview video, which include the new version of Delphi, C++Builder, Delphi Prism and RadPHP (formaly Delphi for PHP), this video  will demonstrate how you can accelerate your development process and improve the quality of your applications using some great third party tools included in RAD Studio XE.

The video will show:

  • FinalBuilder tools (in Enterprise and Architect) to automate your build process
  • Command line audits, metrics and doc generation to add even more functionality to your automated builds
  • AQTime profiling features to deliver high performance apps
  • CodeSite logging tools to help you build high quality apps

Watch the video:

More previews next week, for a while visit the RAD Studio XE Preview page

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/agile-development-delphi-xe-cbuilder-xe-delphi-prism-xe-radphp-xe/feed/ 6
Building iPhone Apps with Delphi Prism XE http://www.andreanolanusse.com/en/building-iphone-apps-with-delphi-prism-xe/ http://www.andreanolanusse.com/en/building-iphone-apps-with-delphi-prism-xe/#comments Fri, 13 Aug 2010 10:00:15 +0000 http://www.andreanolanusse.com/en/?p=328 One of cool features in Delphi Prism XE is the support for iPhone Development using MonoDevelop IDE and MonoTouch, since you already know Delphi language it helps you to jump on iPhone world, another cool feature is the ability to build Moonlight applications (the Mono alternative to Silverlight). For iPhone Development we use two IDEs: […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
One of cool features in Delphi Prism XE is the support for iPhone Development using MonoDevelop IDE and MonoTouch, since you already know Delphi language it helps you to jump on iPhone world, another cool feature is the ability to build Moonlight applications (the Mono alternative to Silverlight).

For iPhone Development we use two IDEs:

  • MonoDevelop IDE integrated with Delphi Prism to create and manage our projects.
  • Interface Builder allows developers to create interfaces for applications using a graphical user interface.

Both IDE’s are very easy to use and reusing our knowledge in Delphi language plus the new features of Delphi Prism language helps a lot. For every new platform is important to understand how it works, with iPhone is not different and I high recommend you to understand first the MVC concept and the iPhone Platform.

Today I was working on some samples and I took two screenshots showing the MonoDevelop IDE and Interface Builder, the second one shows my simple web browser built in Delphi Prism XE.

Delphi Prism XE building iPhone App

MonoDevelop IDE integrated with Delphi Prism XE

Interface Builder in front and behind MonoDevelop IDE integrated with Delphi Prism XE

Next week, here in San Jose, CA we have the DelphiLive, our Delphi Conference where you will have the opportunity to meet and talk face to face with other Delphi developers, as well you will meet the Delphi team and improve your skills. My session “Building managed-code cross platform applications with Delphi Prism” on DelphiLive will demonstrate how you can start developing iPhone applications and how to develop web applications using ASP.NET and deploy on Linux.

I forgot to add an important information about the requirements to build iPhone apps with Delphi Prism, in order to deploy apps to the Apple iPhone AppStore users will need to obtain a MonoTouch deployment license from Novell, join the Apple Developer program, and must adhere to Apple’s iPhone developer license terms. While Apple so far is passing MonoTouch applications, including games built with the Unity Framework, we cannot guarantee that Apple will pass MonoTouch developed applications in the AppStore.

Today Apple announced to “relax all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code”.

For sure there are lot of question about this topic. I will blog more about iPhone Development with Delphi Prism in the future.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/building-iphone-apps-with-delphi-prism-xe/feed/ 18
RAD Studio XE = Delphi XE, C++Builder XE, Delphi Prism XE and RadPHP XE http://www.andreanolanusse.com/en/rad-studio-xe-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/ http://www.andreanolanusse.com/en/rad-studio-xe-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/#comments Tue, 10 Aug 2010 08:47:58 +0000 http://www.andreanolanusse.com/en/?p=321 Developer community today we start the RAD Studio XE Sneak Previews, which includes Delphi XE, C++Builder XE, Delphi Prism XE and RadPHP XE, new names, new tools, new features, and a lot of high productivity in RAD Studio XE. XE in few words means: Heterogeneous database support with no additional cost ToolCloud enable which will […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>

Developer community today we start the RAD Studio XE Sneak Previews, which includes Delphi XE, C++Builder XE, Delphi Prism XE and RadPHP XE, new names, new tools, new features, and a lot of high productivity in RAD Studio XE.

XE in few words means:

  • Heterogeneous database support with no additional cost
  • ToolCloud enable which will help you to management and distribute our Tools in your organization
  • Easy way to upgrade do All-Access XE and get access for all Embarcadero database and developer Tools

But, now let’s talk about some of the great features in RAD Studio XE.

  • Powerful integration with Subversion in Delphi XE, C++Builder XE and Delphi Prism XE.
  • Beyond Compare integrated into the RAD Studio environment is that it really gives you a rich interface for comparing files and understanding the differences that happen between versions of files
  • RadPHP (formerly Delphi for PHP) completed redesigned including a lot of new features in the IDE, debugger, source code editor, new VCL components and more. Also RadPHP enable developers to create a Facebook Application in a very easy way, you will see some videos soon about that.
  • Generate Sequence Diagrams helping you understand your Delphi code

There are much more, watch the first RAD Studio XE Sneak Preview.

Visit the RAD Studio Sneak Preview page and stay tuned!!!

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/rad-studio-xe-delphi-xe-cbuilder-xe-delphi-prism-xe-and-radphp-xe/feed/ 21
“Linq to Directories/Files” – Enumerating Directories and Files with Delphi Prism and .NET 4 http://www.andreanolanusse.com/en/linq-to-directoriesfiles-enumerating-directories-and-files-with-delphi-prism-2011-and-net-4/ http://www.andreanolanusse.com/en/linq-to-directoriesfiles-enumerating-directories-and-files-with-delphi-prism-2011-and-net-4/#comments Tue, 01 Jun 2010 13:54:59 +0000 http://www.andreanolanusse.com/en/?p=307 .NET 4 allow you to enumerate directories and files by using methods that return an enumerable collection of strings of their names, also you can use methods that return an enumerable collection of DirectoryInfo, FileInfo, or FileSystemInfo objects, these objects are very powerfull and make easy the development. Before .NET 4 you could only obtain […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
.NET 4 allow you to enumerate directories and files by using methods that return an enumerable collection of strings of their names, also you can use methods that return an enumerable collection of DirectoryInfo, FileInfo, or FileSystemInfo objects, these objects are very powerfull and make easy the development. Before .NET 4 you could only obtain arrays of these collections. Enumerable collections provide better performance than arrays.

Delphi Prism XE provide full support for .NET 4. the follow examples shows how to enumerate Directories and Files.

Enumareting directory names – this samples list all directories under “c:\Program Files\”

class method ConsoleApp.Main(args: array of System.String);
begin
  try
    var dirPath: System.String := 'c:\Program Files';

    // LINQ query.
    var dirs :=  from dir in Directory.EnumerateDirectories(dirPath) select dir;

    // Show results.
    for each dir in dirs do begin
      // Remove path information from string.
      Console.WriteLine('{0}', dir.Substring(dir.LastIndexOf('\') + 1))
    end;
    Console.WriteLine('{0} directories found.', dirs.Count().ToString());

    // Optionally create a List collection.
    var workDirs: List := new List(dirs)
  except
    on UAEx: UnauthorizedAccessException do begin
      Console.WriteLine(UAEx.Message)
    end;
    on PathEx: PathTooLongException do begin
      Console.WriteLine(PathEx.Message)
    end;
  end;
  Console.ReadKey;

end;

Enumerating file names in all directories – this sample search all TXT files which contains the word “license”

class method ConsoleApp.Main(args: array of System.String);
begin

  try

    var files :=  from sfile in Directory.EnumerateFiles('c:\', '*.txt', SearchOption.AllDirectories)
                  from line in File.ReadLines(sfile)
                  where line.Contains('license')
                  select new class( File := sfile, Line := line);

    for each f in files do begin
      Console.WriteLine('{0}'#9'{1}', f.File, f.Line)
    end;

    Console.WriteLine('{0} files found.', files.Count().ToString());
  except
    on UAEx: UnauthorizedAccessException do begin
      Console.WriteLine(UAEx.Message);
    end;
    on PathEx: PathTooLongException do begin
      Console.WriteLine(PathEx.Message);
    end;
  end;

  Console.ReadKey;

end;

Enumerating a collection of DirectoryInfo objects – this sample list all directories created before April of 2010

class method ConsoleApp.Main(args: array of string);
begin

  var dirPrograms: DirectoryInfo := new DirectoryInfo('c:\program files');
  var StartOf2010: DateTime := new DateTime(2010, 4, 1);

  // LINQ query for all directories created before April of 2010.
  var dirs :=  from dir in dirPrograms.EnumerateDirectories()
               where dir.CreationTimeUtc < StartOf2010
               select new class (ProgDir := dir);
  // Show results.
  for each di in dirs do begin
    Console.WriteLine('{0}', di.ProgDir.Name)
  end;

  Console.ReadKey;
end;

You can download the Delphi Prism 2011 Trial here.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/linq-to-directoriesfiles-enumerating-directories-and-files-with-delphi-prism-2011-and-net-4/feed/ 4
Using LINQ to Objetcs in Delphi Prism http://www.andreanolanusse.com/en/using-linq-to-objetcs-in-delphi-prism/ http://www.andreanolanusse.com/en/using-linq-to-objetcs-in-delphi-prism/#comments Tue, 09 Mar 2010 06:28:23 +0000 http://www.andreanolanusse.com/en/?p=239 During the last 10 year languages, frameworks and development platforms became better and better, we know many of this improvement, but in my opinion LINQ is one of the biggest innovations in the last 10 years. LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
During the last 10 year languages, frameworks and development platforms became better and better, we know many of this improvement, but in my opinion LINQ is one of the biggest innovations in the last 10 years.

LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends all .NET Language like Delphi Prism with native language syntax for queries and provides class libraries to take advantage of these capabilities

There are many ways to use LINQ, querying objects, XML and database, there are other implementations which allow you to query other artifacts.

To start to understanding LINQ, I will exemplify the use of LINQ to Objects querying a list of objects.

The source code used in this post is part of the Delphi Prism demos, folder Linq under Delphi Prism demos. I developed these samples and later we added to the product.

The following example shows a simple query over an Array of String.

type
  Words = public class
  private
    words : Array of String := ['hello', 'Delphi Prism', 'wonderful', 'linq', 'beautiful', 'world' ];
  public
    method SimpleSelect;
    method ComplexSelect;
  end;

The following code shows the implementation for the methos SimpleSelect using LINQ to return a list of words whose length is less than or equal to five characters.

implementation

method Words.SimpleSelect;
begin
  var shortwords := From word in words
                    Where word.Length <= 5
                    Select word;

  Console.WriteLine('Simple select statment');
  Console.WriteLine;

  for each word in shortwords do begin
    Console.WriteLine(word);
  end;

end;

Let’s step by step on this code.

  • Variável shortwords – represent a collection of strings, because in this case we represent each element of the collection as string.
  • From word – variable that represent each element selected in the Array de String
  • in words – collection where LINQ will interact, in the database world it will be our table
  • Where word.Length <= 5 – condition, filter all words with length less or equal 5, look we are using the variable word
  • Select word – represented each element of the collection returned
  •   var shortwords := From word in words
                        Where word.Length <= 5
                        Select word;
    end;

    Using a simple for..each syntax you will be able to interact through the collection shortwords collection, see the code below.

      for each word in shortwords do begin
        Console.WriteLine(word);
      end;

    So far you ask about the capability to order, group by, etc. Simples answer, YES you can. The following example return the words grouped by length, ordered descending and returning a class and not more a string.

      var groups := From word in words
                    Order by word asc
                    Group word by word.Length into lengthGroups
                    Order by lengthGroups.Key desc
                    select new class (Length:=lengthGroups.Key,Words:=lengthGroups);

    We add the clause Order by and Group, where Key represents the string Length for each collection element.

    One of the most powerful feature is the ability to create dynamic classes using the syntax new class, beyond that we are using the lambda expression.

    Lambda expressions are a special type of expression that can be best thought of as mapping a set of one or more values to a result, using a function, sample below Length:=lengthGroups.Key .

    select new class (Length:=lengthGroups.Key,Words:=lengthGroups);

    In case you need to interact through the group, just loop the variable groups, where the property Words represent the list of words for each group.

      for each grupo in groups do begin
        Console.WriteLine('Words of length ' + grupo.Length);
        for each word in grupo.Words do
          Console.WriteLine('   ' + word);
      end;

    Next post I will explain LINQ to XML, see you soon.

    Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

    ]]>
    http://www.andreanolanusse.com/en/using-linq-to-objetcs-in-delphi-prism/feed/ 2