Difference between Design only and Design+Run Time

I put together a test project together with a package that I configured from one test to the next as (1)Design Only, (2)Run Time Only, (3)Design plus Run Time, respectively. IOW, the package was saved/installed 3 times as a different type each time and then tested a number of ways with the test application which takes a component from the package. The objective was to explore differences in behavior and use.

I discovered absolutely *no* difference between use and behavior of a Design Time Package vs. a Design plus Runtime and they install the same way.

"Run time only" is as expected: "Component/Install Packages" simply refuses if you navigate to the .bpl, which is what we would want.

A "Design time only" works just like the "Design+runtime". You can Build with or without the .bpl to produce either a "link with RT packages" or link with your .dcu's.

If my finding is correct, why is there even mention of a "Design Time plus Run Time" option and/or why is there "Design Time Only" and not just "Design Time"?  I notice in the old Borland manuals there is only Run Time and Design Time.

It is certainly possible I have overlooked something but would like to know what it is.

Best wishes,
gk
0
Garth
2/12/2014 4:07:50 PM
public.delphi.vcl.writing 510 articles. 0 followers. Follow

5 Replies
1392 Views

Similar Articles

[PageSpeed] 27

Garth wrote:

> I discovered absolutely *no* difference between use and behavior of
> a Design Time Package vs. a Design plus Runtime and they install the
> same way.

There is a difference.

> "Run time only" is as expected: "Component/Install Packages" simply
> refuses if you navigate to the .bpl, which is what we would want.
> 
> A "Design time only" works just like the "Design+runtime".

When installing a package into the IDE, it only cares about the "designtime" 
portion, so in that regard both types are treated equally.

> If my finding is correct, why is there even mention of a "Design Time
> plus Run Time" option and/or why is there "Design Time Only" and not
> just "Design Time"?

There really is a semantical difference.  A "Runtime only" package cannot 
be loaded by the IDE, only linked into a compiled executable.  A "Designtime 
only" package can be loaded into the IDE but cannot be linked into a compiled 
executable.  A mixed package can be both loaded into the IDE at designtime 
and linked into a compiled executable.  Most packages are typically marked 
as "Runtime and Designtime" because they do not contain designtime-specific 
code in them, only component registrations, which can be used at both design-time 
and run-time.  The only time you would create "Runtime only" and "Designtime 
only" packages is when you need to implement custom design-time editors and/or 
wizards for use in the IDE.  In which case, your component code MUST be implemented 
in a "Runtime only" package (since that code is linked into compiled executables 
and not used by the IDE itself) and the editors/wizards MUST be implemented 
in a separate "Designtime only" package (that is what the IDE uses directly) 
that requires the "Runtime only" package.

--
Remy Lebeau (TeamB)
0
Remy
2/12/2014 5:25:34 PM
Garth Klatt wrote:

> I put together a test project together with a package that I
> configured from one test to the next as (1)Design Only, (2)Run Time
> Only, (3)Design plus Run Time, respectively. IOW, the package was
> saved/installed 3 times as a different type each time and then tested
> a number of ways with the test application which takes a component
> from the package. The objective was to explore differences in
> behavior and use.
> 
> I discovered absolutely no difference between use and behavior of a
> Design Time Package vs. a Design plus Runtime and they install the
> same way.

There is a difference if the design-time package needs to install some
support for the component's design-time behaviour, e.g. by installing a
custom property or component editor, or some kind of wizard or other
add-on. These things make the package dependent on another package
(designIDE) that can only be used inside the IDE process. For such a
case you must create different design-time and run-time packages (the
latter does not contain the IDE support, only the component itself and
library code it may need to work at run-time).

If the component does not require such design-time support you can use
a single package to install the component into the IDE and to use it in
applications that are build with run-time packages. That is what the
Design plus Runtime setting gains you: you only have one package
project to maintain instead of two.


-- 
Peter Below (TeamB)
0
Peter
2/12/2014 5:40:52 PM
Thanks for the replies,

I confirmed in a subsequent experiment that it is possible to do an application "Build", producing an .exe having a component that came from a "Design time Only" package. With "Build with runtime packages" chosen, the application runs providing the system can find the .bpl and redistributables.

If you do not want your customer having your design time controls/code, simply Build your application with "Link with Runtime Packages". Supply him the .bpl (plus rtl190 and vcl190 re-distributables) and instructions for installation (it could go in his application folder).  

If you want the customer to have a fully stand-alone application (no runtime library) uncheck "Link with Runtime Packages" and put a path in Project Options  to the .pas or .dcu files for the component so the compiler or linker can find these. There is no package involved and the component code is now hard-wired in the application. You can do this with either a "Design Time Only" or  a "Design and Runtime" package as confirmed by my experiment. With either one (assuming same component(s)) you get the same
 thing when building the application. 

If I distribute a "Design Time Only" package the customer can install it to his IDE and develop applications with the components, producing stand-alones or runtime linked applications (he'll also need my .dcu's for the components if he wants to build stand-alones) - just as if I gave him a "Design plus Runtime" package.

Sorry to belabor this but it's very interesting.

best wishes,
gk.


> {quote:title=Peter Below wrote:}{quote}
> Garth Klatt wrote:
> 
> > I put together a test project together with a package that I
> > configured from one test to the next as (1)Design Only, (2)Run Time
> > Only, (3)Design plus Run Time, respectively. IOW, the package was
> > saved/installed 3 times as a different type each time and then tested
> > a number of ways with the test application which takes a component
> > from the package. The objective was to explore differences in
> > behavior and use.
> > 
> > I discovered absolutely no difference between use and behavior of a
> > Design Time Package vs. a Design plus Runtime and they install the
> > same way.
> 
> There is a difference if the design-time package needs to install some
> support for the component's design-time behaviour, e.g. by installing a
> custom property or component editor, or some kind of wizard or other
> add-on. These things make the package dependent on another package
> (designIDE) that can only be used inside the IDE process. For such a
> case you must create different design-time and run-time packages (the
> latter does not contain the IDE support, only the component itself and
> library code it may need to work at run-time).
> 
> If the component does not require such design-time support you can use
> a single package to install the component into the IDE and to use it in
> applications that are build with run-time packages. That is what the
> Design plus Runtime setting gains you: you only have one package
> project to maintain instead of two.
> 
> 
> -- 
> Peter Below (TeamB)
0
Garth
2/12/2014 10:16:34 PM
Hello Garth,

> Thanks for the replies,
> 
> I confirmed in a subsequent experiment that it is possible to do an
> application "Build", producing an .exe having a component that came
> from a "Design time Only" package.

A "Designtime only" package is meant for use only by the IDE.  It SHOULD 
NOT be linked into an executable.  Even if it is *technically* possible to 
do, it is *semantically* wrong, and goes against the IDE's Terms of Service 
anyway, which forbids design-time code to be linked into run-time executables.

> If you do not want your customer having your design time controls/code,
> simply Build your application with "Link with Runtime Packages".

Design-time packages should be compiled with Runtime Packages enabled, so 
they can share the same RTL/VCL that the IDE itself uses. 

Run-time packages may or may not need to be compiled with Runtime Packages 
enabled, depending on your actual needs.

> Supply him the .bpl (plus rtl190 and vcl190 re-distributables) and
> instructions for installation (it could go in his application folder).

Packages are version-specific, so you would have to provide .dcus and/or 
..bpi/.bpl files for every IDE version you want to support.

> If you want the customer to have a fully stand-alone application (no
> runtime library) uncheck "Link with Runtime Packages" and put a path
> in Project Options  to the .pas or .dcu files for the component so the
> compiler or linker can find these.

You should compile the .pas/.dcu files into a Runtime package, and then link 
that package into projects.  If you have design-time editors for the components, 
you MUST do that.

If you don't want the users to have access to the component source, giving 
them .dcu files is OK, but you are again restricted to versioning limitations.

> There is no package involved

There should be.

> and the component code is now hard-wired in the application.

It would be if you provided a Runtime Package that has a .bpi file associated 
with it.  The .bpi would be statically compiled into projects that have Runtime 
Packages disabled, and the .bpl would be dynamically linked to in projects 
that have Runtime Packages enabled.

You are circumventing the system, instead of using it the way it is meant 
to be used.

> You can do this with either a "Design Time Only" or a "Design and Runtime"
> package as confirmed by my experiment.

A "Designtime only" package SHOULD NEVER be linked into an executable.

A "Designtime and Runtime" package CAN be linked into an executable, but 
ONLY if it does not contain any design-time code in it (other than RegisterComponents(), 
which is implemented in a runtime package and not in a designtime package).

> With either one (assuming same component(s)) you get the same thing when
> building the application. If I distribute a "Design Time Only" package the
> customer can install it to his IDE and develop applications with the components,
> producing stand-alones or runtime linked applications (he'll also need my
> .dcu's for the components if he wants to build stand-alones) - just as if
> I gave him a "Design plus Runtime" package.

The *correct* solution is to provide separate Runtime and Designtime packages, 
don't provide the .dcu files, and do not provide a do-all "Designtime only" 
package - which would be a violation of the "designtime only" semantic.

--
Remy Lebeau (TeamB)
0
Remy
2/12/2014 10:47:09 PM
Thanks Remy,

I appreciate the thorough response and have copied the text of this conversation into my "notes" folder for future reference.

Your reply has been marked with the full stars.

Best wishes,
gk



> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Hello Garth,
> 
> > Thanks for the replies,
> > 
> > I confirmed in a subsequent experiment that it is possible to do an
> > application "Build", producing an .exe having a component that came
> > from a "Design time Only" package.
> 
> A "Designtime only" package is meant for use only by the IDE.  It SHOULD 
> NOT be linked into an executable.  Even if it is *technically* possible to 
> do, it is *semantically* wrong, and goes against the IDE's Terms of Service 
> anyway, which forbids design-time code to be linked into run-time executables.
> 
> > If you do not want your customer having your design time controls/code,
> > simply Build your application with "Link with Runtime Packages".
> 
> Design-time packages should be compiled with Runtime Packages enabled, so 
> they can share the same RTL/VCL that the IDE itself uses. 
> 
> Run-time packages may or may not need to be compiled with Runtime Packages 
> enabled, depending on your actual needs.
> 
> > Supply him the .bpl (plus rtl190 and vcl190 re-distributables) and
> > instructions for installation (it could go in his application folder).
> 
> Packages are version-specific, so you would have to provide .dcus and/or 
> .bpi/.bpl files for every IDE version you want to support.
> 
> > If you want the customer to have a fully stand-alone application (no
> > runtime library) uncheck "Link with Runtime Packages" and put a path
> > in Project Options  to the .pas or .dcu files for the component so the
> > compiler or linker can find these.
> 
> You should compile the .pas/.dcu files into a Runtime package, and then link 
> that package into projects.  If you have design-time editors for the components, 
> you MUST do that.
> 
> If you don't want the users to have access to the component source, giving 
> them .dcu files is OK, but you are again restricted to versioning limitations.
> 
> > There is no package involved
> 
> There should be.
> 
> > and the component code is now hard-wired in the application.
> 
> It would be if you provided a Runtime Package that has a .bpi file associated 
> with it.  The .bpi would be statically compiled into projects that have Runtime 
> Packages disabled, and the .bpl would be dynamically linked to in projects 
> that have Runtime Packages enabled.
> 
> You are circumventing the system, instead of using it the way it is meant 
> to be used.
> 
> > You can do this with either a "Design Time Only" or a "Design and Runtime"
> > package as confirmed by my experiment.
> 
> A "Designtime only" package SHOULD NEVER be linked into an executable.
> 
> A "Designtime and Runtime" package CAN be linked into an executable, but 
> ONLY if it does not contain any design-time code in it (other than RegisterComponents(), 
> which is implemented in a runtime package and not in a designtime package).
> 
> > With either one (assuming same component(s)) you get the same thing when
> > building the application. If I distribute a "Design Time Only" package the
> > customer can install it to his IDE and develop applications with the components,
> > producing stand-alones or runtime linked applications (he'll also need my
> > .dcu's for the components if he wants to build stand-alones) - just as if
> > I gave him a "Design plus Runtime" package.
> 
> The *correct* solution is to provide separate Runtime and Designtime packages, 
> don't provide the .dcu files, and do not provide a do-all "Designtime only" 
> package - which would be a violation of the "designtime only" semantic.
> 
> --
> Remy Lebeau (TeamB)
0
Garth
2/19/2014 10:11:02 PM
Reply:

Similar Artilces:

what is the difference between writing code in design mode and in run time??
hi, could any one tell me what is the dfference between writing the code in design mode and in run time mode?? which has the edge over another??...

strange design time and run time difference.
 Hello I am experiencing a strange behaviour.I have a master page with all the graphics and then I have a content page ( default.aspx).When I look in the design view in my VS 2008 ...It shows me the graphics and everything...so it is correct here...but when I do the right click on the default.aspx and click on View in Browser option it does not show me the graphics...have any one else experienced this?   Try building it using F5 or ctrl + F5 instead. I guess view in browser shows only the single file instead of building all. If that doesn't work something weirder is goin...

Excel behavior difference in design time vs run time
All - I have an app that uses OLE to pass data to a spreadsheet on the network. After the data is set in the spreadsheet - and the DiconnectObject function called, I can save the spreadsheet no problem in design time. In run time, the machine hangs for about 3 minutes, and totally IO blocks, before the save is complete. Both run and design time use the exact same spreadsheet. The behavior is the same on any machine, my machine and all of the clients. We use Excel 97 and PB 8.02 build 9056. TIA. My bad - they were using two different instances of the same spreadshee...

it's running on design time but not run time.
Code is like that. This code is running on desing time.. but it is not running on run time. Exception is "ComException:An operations error occured." After "search.findOne(); " exception occured. Probably reason is security.. but What's wrong? Thanks for advice. Code lines: --------------------------------------------------------------------------------------------------------------System.Security.Principal.WindowsImpersonationContext impersonationContext = ((System.Security.Principal.WindowsIdentity)Page.User.Identity).Impersonate(); Session["UserName...

design time vs run time
I am using PB 8 IDE. I ran application from PB IDE and opened one window. This window retrieves all customers due for bills. And then goes thru one customer at a time, and retrieved another DW for that customers bill. It then saves bill in pdf and moves to next row. Retreived DW for bill, saves in PDF so on.... When this window is running in application, i opened another PB IDE and made some changes in the bill DW, saved, regenerated. Will this affect the running application? Changes I made in another PB IDE in billing DW, 1)will reflect in the running PB IDE application or 2)...

Design-Time vs. Run-Time
Hello again,  had a general VS question.  Not sure if I sould post here but maybe someone has a quick answer.  It should be simple...When I'm designing a windows-form in VS, there are new items in 2005, the GroupBox now has rounded corners.  During design-time, these corners are actually round.  But, when I run my application, they are square.  Any suggestions?Also, on the new toolstrip and container, they are different colors from design-time to runtime...Thanks,KeithThere's No Place Like 127.0.0.1 Hi Keith,My suggestion would be to try asking at the foll...

datawindow works at design time but not run time
Okay. I'm stumped. I've got a datawindow with a somewhat complicated SQL statement behind it. But it works. Sort of. In design time, I can retrieve the datawindow with exactly the results I'm expecting. But when I run the program, I get the following error: Select error: SQLSTATE = 37000 [Microsoft][ODBC SQL Server Driver]Syntax error or access violation If I remove the "where" clause, it works perfectly (but obviously isn't what I'm after). Anybody got any suggestions? Environment is win2kPro, SQL Server 2000 Standard, and PB 8.0.3 (9704)...

Knowing if a component is at Design time or Run time
I have a composite customer server control that requires access to the Page object to render its children correctly. protected override void CreateChildControls() { // add the wizard bars prepared in the constructor AddWizardBars(); // parse web.config and load all wizard step controls if (this.Page!=null) //do not enter here if we are working with the designer { LoadSteps(); if (!Page.IsPostBack) //initialize only first time control is loaded on page MoveForward (null, InitialStep); } } While this works correctly at run ...

Design time:run time display ratios
Hi! When you create an object in Power++ and specify the size you want it, the size actually created at run time is different. I have noticed that when using Large Fonts it is twice as big, and when using Small Fonts it is 1.5 times as big. I want to dynamically create buttons on a form, and it may not have any other buttons on it of the correct size already (so I can't just copy the other button's attributes). Is there any way to find out what this ratio is? I have looked through the Power++ help and the Win32SDK help but I can't find anything. We are using Power...

In design time pictures show but not in run time?
 Hello,      In my first aspx page I was able to add a login control thanks to the  many people who helped me. But I have a problem.  My web page have some pictures in a subdirectory. So I can view then in design time on the page fine. But when I run the program I have nothing but red x's. The portion of teh html code is below. All the pictures are in support subdirectory of  my websites directory. So what's wrong? Thank you. Athena                   ...

How to determine what is now: design time or run time ?
How can I determine in C# code what is now: design time or run time ? You can use the "DesignMode" property on your control in .NET 2.0. See this page for more information: http://msdn2.microsoft.com/en-us/library/system.web.ui.control.designmode.aspx It's a protected member, so you can just access this property within your class that derives from any Control.Cheers,       Kevin JonesMy Blog...

Rendering in Design time vs. Run Time
Is there a way I can render my composite server control differently in design time and run time? I can render it just fine in design-time, however, when I add code that grabs run-time elements, the control will no longer render at design-time...which makes sense. I was wondering if I could bypass this code for just design-time rendering. I remember developing ActiveX controls in VB6 and being able to do so. I'm wondering if it's possible in ASP.Net server control development. Thanks. Just attach designer for the control (class that inherits from System.Web.UI.Design.ControlDesigner) ...

PB Design Time versus Run time
Hi , It's me again . I have a question - Is it possible to find if an application is runnning from Powerbuilder Environment or from the Executable /PBD files ? Thanks, Myra Sure... IF Handle( GetApplication() ) = 0 THEN MessageBox( "Who am I?", "IDE" ) ELSE MessageBox( "Who am I?", "EXE" ) END IF -- <hopethishelps/> Roy Kiesler [TeamSybase] Sybase Developer Network -- http://sdn.sybase.com <Myra> wrote in message news:15B6CBE2CEC1665700009CC885256C43.00009CD785256C43@webforums... > Hi , > ...

Free design time components at run time?
Hi: I'm working on a project in Delphi 6 that I hope will be compatible with later versions. I'm using the TNT components to display Unicode text, but I don't want to require that users of Delphi 2009 and later (if TNT is compatible with these at all) have the components installed (given the native Unicode support available in those editions). At the moment I use compiler directives to distinguish between versions, and dynamically create all of my Unicode-displaying GUI controls at run time. {$IFDEF DELPHI2009} Edit1: TEdit; {$ELSE} Edit1: TntEdit; {$ENDIF DELPHI200...

Web resources about - Difference between Design only and Design+Run Time - public.delphi.vcl.writing

Difference - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

3Q EARNINGS: Mark Zuckerberg on the Differences Between Messenger and WhatsApp
When Facebook announced its intent to acquire cross-platform messaging application WhatsApp in February, questions surfaced on whether WhatsApp ...

Facebook Tips: What’s the Difference between Top News and Most Recent?
The following is part of our series, Facebook Tips, which answers some of the most commonly asked questions about using Facebook. While we hope ...

Belgium cats, raids and religious differences explained by a Belgian
Belgium police joined the cat fun at the end of a tense day of anti-terror raids and arrests in Brussels.

Cultural differences fade when Westerners and Chinese fall in love
One in three Australian marriages are now intercultural. Researchers have found out a key ingredient for success.

What Happens To A Texas Veterinarian Could Make A Difference In What You’re Allowed To Say
This Term the Supreme Court could issue one of its most important rulings to date on the legal status of occupational speech speech performed ...

Can the US and China transcend their differences?
Why Washington should embrace Beijing’s “new type of major-power relationship”

"There’s been a lot of poorly thought-out stuff written about the differences between men’s and women’s ...
... But if you can get past all of this pseudoscience, there’s some legitimately illuminating, serious medical research on sex-based brain differences ...

Slant wants to transform online media by paying writers 70% of ad revenue — but will that make a difference ...
When Amanda Gutterman talks about her vision for Slant , a platform-publisher hybrid that "soft launched" in July, you can tell she believes ...

Anonymous just might make all the difference in attacking ISIS
In the wake of the horrific attacks in Paris, military operations against ISIS terrorist strongholds have increased. When someone hits you, it’s ...

Resources last updated: 12/1/2015 11:14:18 AM