IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Prism
Search Prism Group:

Advanced
-Collapse +Expand Prism To/From
To/FromCODEGuides
-Collapse +Expand Prism Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Prism Store
PRESTWOODSTORE

Prestwood eMagazine

June Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi Prism   Print This     

  From the December 2008 Issue of Prestwood eMag
 
Introducing Delphi Prism. The new Delphi.Net!
 
Posted 9 years ago on 11/25/2008
Summary: Delphi Prism targets .Net and Mono and is based on the Visual Studio.Net IDE.

KB101640



Delphi Prism screen shot.RemObjects Software and Embarcadero Technologies have announced that they will join forces to develop and release Delphi Prism, a next generation development suite for .NET and Mono, based on RemObjects Software's Oxygene compiler technology.

Delphi Prism will replace both Delphi for .NET and the existing Oxygene product, allowing the two companies to work together on providing one unified solution for managed development

Key Points:

  • Install Delphi Prism as a plug-in to Visual Studio or run as a standalone development tool.
  • Targets .Net and Mono.
    • Target .NET applications using the latest Microsoft .NET 3.5 technologies such as WinForms, WPF, Silverlight, ASP.NET, and LINQ'
    • Mac OS X and Linux with open source CLR technologies such as Mono and Cocoa#'
  • Build Windows applications first and foremost but also build Mac and Linux applications for added flexibility.
  • Integrated managed code database engine targeting Windows, Mac OS X, and Linux.
  • Supports all CLS features such as generics, sequences, queries and parallel computing.
  • No VCL.Net (this Delphi for .Net feature was dropped).

The press releases:

After Installation

After you install Delphi Prism, if you already have Visual Studio.Net installed, you will have an extra "Delphi Prism" New Project group. If you don't have VS.Net installed, the installation will automatically install the VS.Net shell.

Used in Prestwood news post.

My installation installed into a RemObjects Oxygene group perhaps because I had Oxygene installed but I imagine CodeGear will change the group to Delphi Prism or RAD Developer Studio or something similar.

Used in Prestwood news post.

 

Optionally, the installation will install the current version of Mono for Windows as well for cross platform Mono development.

Used in Prestwood news post.

Sample Project

Here is a simple WinForms project with a single form with a single button.

Program.pas

Program.pas is the new dpr project-like file.

Visual Studio.Net uses the concept of a solution file and project file to store solution and project level settings. That means a slight change for the Delphi traditional-project file (now a Program.pas file).

Here's an example:

namespace ButtonsP;

interface
 
uses
System.Threading,
System.Windows.Forms;
 
type
Program = assembly static class
private
class method OnThreadException(sender: Object; e: ThreadExceptionEventArgs);
public class method Main;
end;
 
implementation

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
class method Program.Main;
begin
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

  Application.ThreadException += OnThreadException;
  using lMainForm := new MainForm do
  Application.Run(lMainForm);
end;

/// <summary>
/// Default exception handler
/// </summary>
class method Program.OnThreadException(sender: Object; e: ThreadExceptionEventArgs);
begin
  MessageBox.Show(e.Exception.Message);
end;
 
end.

Notice the Main method which is the entry point for the executable. All .NET projects except for DLLs have one.

Main.pas

Sample Form Code

Here's the form code for our simple example with one form with one button and a Click event handler

namespace ButtonsP;
 
interface
 
uses
System.Drawing,
System.Collections,
System.Collections.Generic,
System.Linq,
System.Windows.Forms,
System.ComponentModel;

type
/// <summary>
/// Summary description for MainForm.
/// </summary>
MainForm = partial class(System.Windows.Forms.Form)
private method button1_Click(sender: System.Object; e: System.EventArgs);
protected method Dispose(disposing: Boolean); override;
public constructor;
end;
 
implementation
 
{$REGION Construction and Disposition}
constructor MainForm;
begin
//
// Required for Windows Form Designer support
//
InitializeComponent();
  //
// TODO: Add any constructor code after InitializeComponent call
//
end;
 
method MainForm.Dispose(disposing: Boolean);
begin
if disposing then begin
if assigned(components) then
components.Dispose();
      //
// TODO: Add custom disposition code here
//
end;
 
  inherited Dispose(disposing);
end;
{$ENDREGION}
 
method MainForm.button1_Click(sender: System.Object; e: System.EventArgs);
begin
MessageBox.Show("Hello World!");
end;
end.

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1225A1
Enter key:
News Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101640 Counter
8918
Since 11/25/2008
-
   Contact Us!
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


Go ahead!   Use Us! Call: 916-726-5675 


©1995-2017 Prestwood IT Solutions.   [Security & Privacy]