1
 Follower
3
 Likes

LifeTime - Remove Unused dependencies on publish (Cleanup)

Lifetime
New

Situation:

When I develop an application, I tend to reference "everything" from eSpaces and Extensions I am using (Not everything on the server ;)). 

To have a complete set of tools works better than to reference each individual item on a "need to have" basis. 

For instance:

When I need something from WebPatterns or OutSystems UI, I select everything to have the tools available.

Problem:

When I want to promote a version to the next server using LifeTime, the systems gets all the referenced stuff, creates a package and deploys it on the next server. Even the references which are not used. 

This results in larger applications and unnecessary references (and potential problems)

Off course you can say, you have to clean your solution before promoting, or be restrictive on references, but this has three major flaws:

  1. As a developer, I want to develop as fast as possible and with the least amount of waiting to get my gear (Ergo, change my references on a need to have basis)
  2. It just takes one developer on one moment to create references which are not needed (anymore) and bloating up the solution
  3. Serious applications consists of multiple modules, across multiple applications each with their own references. A promotion using LifeTime, means I have to open Service Studio and check all applications and eSpaces, which costs a lot of time (opening/refreshing/publishing/repeat on all you applications and modules).

Service Studio is not efficient in these tasks. It focuses on development in a module/application. It is not equipped to manage large solutions.

Service Studio has a "Remove unused dependencies" function, but only on the active module.

Service Center has a publish application function, which refreshes the application but does not do any cleaning.


Idea:

When promoting a solution using LifeTime deployment, include an optional checkbox to remove unused references (E.g. "Remove unused references on deploy")  from the modules/applications which are deployed on the target server.

When this option is checked (Over simplified pseudo solution):

  1. Publish the application package on the target server as-is (Source server is not modified), using the existing functionality.
  2. If the checkbox "Remove unused references on deploy" is checked and when published to a server which is marked as Development, execute the "remove unused dependencies" for each published module.
    (This could be more efficient, but these functions are already in the platform at the moment. It should be done on the target server, to prevent it changes the environment on the source server, forcing the developer to re-reference the libraries. More efficient for instance would be to cleanup "in memory" before deployment to prevent the deployment of referenced modules which are not used at all in the code)
  3. (Re-?)Compile the application on the target server with the cleaned solution

Why only on a server marked as Development?
In "normal situations", we use an DTAP solution, where D and T usually are marked as development servers. A (sometimes) and P are production servers. The main issue is in the deployment from D-server to T-server.
In the proposed scenario,

  • We can reference as a developer whatever we want on the D server. 
  • Deployment to the T server, will be executed with the clean-up, so we can test its functionality with the cleaned solution.
  • Deployment to the A and P server, we deploy the version as is, because we do not want the solution to be changed without proper testing.




Created on 12 Feb (5 days ago)
Comments (1)

Changed the category to Lifetime


views
25
Followers
1