Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Migrating EGL CE projects to EDT
Migrating EGL CE projects to EDT [message #763326] Fri, 09 December 2011 10:18 Go to next message
Kevin Tierney is currently offline Kevin Tierney
Messages: 3
Registered: December 2011
Location: Arkansas
Junior Member
What is the best way to migrate CE projects to EDT?
Re: Migrating EGL CE projects to EDT [message #763332 is a reply to message #763326] Fri, 09 December 2011 10:29 Go to previous messageGo to next message
Will Smythe is currently offline Will Smythe
Messages: 41
Registered: July 2009
Member
Kevin - I would start here: http://wiki.eclipse.org/EDT:How_to_move_RBD_app_to_EDT

An EDT "Web 2.0 client with services" project is configured for both Java and JavaScript like a CE project (the client package is setup for JS, server is setup for Java, and common is setup for both). You can put EGL parts that will run on the server in "server" (so, like services), RUI and client-side parts in "client", and common parts (records, common libraries), under "common". Of course, if you already have your own package structure, you can replicate this in an EDT project, and then configure the compiler/generator settings for a package or part via Properties > EDT Compiler.
Re: Migrating EGL CE projects to EDT [message #763333 is a reply to message #763332] Fri, 09 December 2011 10:33 Go to previous messageGo to next message
Aaron Allsbrook is currently offline Aaron Allsbrook
Messages: 23
Registered: July 2009
Junior Member
Hi Kevin,

I've mainly only migrated RUI project so far. In comparison to other migrations this is simple. I usually have everything standing in under 30 minutes. The big ones are removing the zero from an array declaration and then removing the stereotype of BasicRecord. Mostly its just removing something that are no longer required.

<edit>
oh yeah, I forgot to add, copy and paste your code into a project created in EDT... using the archive import is a lot of wasted time. Just create a new project and copy things into it.
</edit>

[Updated on: Fri, 09 December 2011 10:35]

Report message to a moderator

Re: Migrating EGL CE projects to EDT [message #763388 is a reply to message #763333] Fri, 09 December 2011 12:16 Go to previous messageGo to next message
Will Smythe is currently offline Will Smythe
Messages: 41
Registered: July 2009
Member
Note to all: you can 'watch' this wiki page (click Watch at the top after logging in). This will cause you to get notified whenever the page changes.
Migrating EGL CE projects to EDT - Joined Record [message #763471 is a reply to message #763326] Fri, 09 December 2011 15:43 Go to previous messageGo to next message
Kevin Tierney is currently offline Kevin Tierney
Messages: 3
Registered: December 2011
Location: Arkansas
Junior Member
Thanks for the tips guys.

I was able to join tables in CE using content assist for Record, see code.
What is the corresponding syntax for a join in EDT?
Record EventContacts type SQLRecord
{tableNames = [["contacts", "a"] ,["event_contacts", "b"]], 
defaultSelectCondition = #sqlCondition{a.Contact_ICN = b.Contact_ICN}, 
keyItems=[Contact_ICN, Contact_Name, Contact_Email, event_contacts_Contact_ICN, Event_ID, RuleNo] 
}
  Contact_ICN int                 {column="a.Contact_ICN", isReadOnly=yes};
  Contact_Name string             {column="a.Contact_Name", isReadOnly=yes, sqlVariableLen=yes, maxLen=30};
  Contact_Email string            {column="a.Contact_Email", isReadOnly=yes, sqlVariableLen=yes, maxLen=50};
  Contact_Cell_No decimal(10)  	  {column="a.Contact_Cell_No", isReadOnly=yes};
  Contact_Cell_Service string  	  {column="a.Contact_Cell_Service", isReadOnly=yes, sqlVariableLen=yes, maxLen=30};
  Contact_Status string  	  {column="a.Contact_Status", isReadOnly=yes, maxLen=8};
  Event_Contacts_Contact_ICN int  {column="b.Contact_ICN", isReadOnly=yes};
  Event_ID string                 {column="b.Event_ID", isReadOnly=yes, maxLen=5};
  RuleNo int                      {column="b.RuleNo", isReadOnly=yes};
end

[Updated on: Fri, 09 December 2011 18:06]

Report message to a moderator

Re: Migrating EGL CE projects to EDT - Joined Record [message #764633 is a reply to message #763471] Mon, 12 December 2011 10:05 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph Vincens
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
EDT 0.7.0 does not support syntax to generate a JOIN statement.
You will need to change your record and write an SQL statement to support the JOIN.


Record EventContacts
  Contact_ICN int			{@Column {updateable = false}};
  Contact_Name string			{@Column {updateable = false}};
  Contact_Email string			{@Column {updateable = false}};
  Contact_Cell_No decimal(10)		{@Column {updateable = false}};
  Contact_Cell_Service string		{@Column {updateable = false}};
  Contact_Status string			{@Column {updateable = false}};
  Event_Contacts_Contact_ICN int	{@Column {updateable = false}};
  Event_ID string			{@Column {updateable = false}};
  RuleNo int				{@Column {updateable = false}};
end


There are a few ways to write an SQL JOIN, here's how I would start the SQL using the record you provided:

		GET eventContacts from ds with
			#sql{
				select
					contacts.Contact_ICN, rtrim(contacts.Contact_Name), rtrim(contacts.Contact_Email), 
					contacts.Contact_Cell_No, rtrim(contacts.Contact_Cell_Service), 
					rtrim(contacts.Contact_Status), event_contacts.Contact_ICN, 
					rtrim(event_contacts.Event_ID), event_contacts.RuleNo
				from contacts, event_contacts ............complete the JOIN statement
			};



regards,
Joe
Re: Migrating EGL CE projects to EDT - Joined Record [message #764704 is a reply to message #764633] Mon, 12 December 2011 12:52 Go to previous messageGo to next message
Kevin Tierney is currently offline Kevin Tierney
Messages: 3
Registered: December 2011
Location: Arkansas
Junior Member
Hi Joe,
Thanks for the information.
I think I'll create the Join in the DB using a View, then use the View as my EGL Record.
Kevin
Re: Migrating EGL CE projects to EDT - Joined Record [message #764756 is a reply to message #764704] Mon, 12 December 2011 14:48 Go to previous message
Dan Darnell is currently offline Dan Darnell
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

Hi Kevin,

Using a view sounds like an excellent idea to me!

--Dan
Previous Topic:[Solved] Language elements not supported in EDT - Called Program
Next Topic:Tutorial issues or config bugs
Goto Forum:
  


Current Time: Thu Jul 24 04:32:18 EDT 2014

Powered by FUDForum. Page generated in 0.03926 seconds