-Collapse +Expand

Prism

Search Prism Group:

Advanced
-Collapse +Expand Prism Group Home
-Collapse +Expand Message Board
-Collapse +Expand Knowledge Base
-Collapse +Expand Prism To/From
To/FromCODEGuides
-Collapse +Expand Prism Study Test
PRESTWOODCERTIFIED
-Collapse +Expand Prism Store
PRESTWOODSTORE
-Collapse +Expand Members Only
Prestwood Tip Jar
Tip Jar
Finding something useful?

Add to the
Tip Jar!

Prestwood eMagazine

Subscribe now!
Enter your email:


   PrestwoodBoardsKBProgrammingDelphi Prism   
Go To Random Article

  From the December 2008 Issue of Prestwood eMag
 
Introducing Delphi Prism. The new Delphi.Net!
By Mike Prestwood
11/25/2008
 

Delphi Prism targets .Net and Mono and is based on the Visual Studio.Net IDE.



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.
News Contributed By Prestwood staff member Mike Prestwood:
mprestwood
Email Approved! E CA USA

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.


Comments

0 Comments.
Would you like to comment? Reply? Ask a question? Say thanks?
Add Comment



 KB Article #101640 Counter
1575
Since 11/25/2008

Sponsored Ad
Brought to you by Prestwood IT Solutions
We hope you are enjoying our knowledge base! We welcome your participation in our open online community. As the caretakers, we pay our staff to moderate, edit, and contribute free content here in an effort to promote our software development company. Keep us in mind if you or your company needs help. Whether you need a single developer or a team, consider Prestwood. We are an American company that keeps jobs in America (no off shoring and no need for H-1B developers). Our hope is that you will put some or all of your development tasks in our hands. We specialize in hourly help (1 hour minimum), custom websites from $2k to $40k, business database applications from $5k to $60k, and enterprise application development starting from $20k. Talented Developer?
If you are a talented developer and would like to work with us, start by filling out our Register for Work form.
 
707 People Online Now!!  
Online Now: Sign In to see who's online now!  Not a member? Join Prestwood now. It's free!