cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilya <ilya.mailing.li...@gmail.com>
Subject Re: how to go about codebase quality when colisions occur?
Date Tue, 03 May 2016 18:26:43 GMT
Linas

Congrats on first java project ever!

CloudStack supports custom pluggable APIs that you dont have to bake
into code base - unless you feel many other users will benefit from it.
We do it all the time and i'm sure many others orgs do the same...

Search the web for CloudStack custom API, there is a baked in example
for creating custom API plugin and get time date from Management Server..

Also, this thread is a good example:
https://www.mail-archive.com/dev@cloudstack.apache.org/msg55559.html

I recall there was a doc that explained it in greater detail, but i
havent had a chance to look for it.

Regards
ilya

On 5/3/16 5:36 AM, Linas Žilinskas wrote:
> Hello.
> 
> I implemented a new API call for myself, which returns the VNC url for a VM.
> Currently i'm using some classes from the consoleproxy servlet package as well as copied
some code over to my own package/class (specifically the encryption stuff)
> Now i have questions regarding this way of doing things.
> 
> I'm all about isolation and making stuff portable as much as possible. To me the consoleproxy
seems like a semi-standalone project. Therefore it doesn't seem nice to be using packages/classes
willy nilly across other packages.
> 
> So should i split the reusable code into a separate package and store it somewhere in
the shared codebase, or should i just duplicate code. I saw that the servlet itself has a
copied over class from the standalone consoleproxy project.
> 
> Or maybe there's some way of implementing the api calls into the consoleproxy project
itself?
> 
> PS. This is my first java project ever, so i'm learning as i go through the code. So
bear with me if the language i use seems off
> 
> Regards
> 
> Linas Žilinskas
> 
> Development Lead
> 
> [http://host1plus.com/images/h1p_e_sig/sig_logo.png]<http://www.host1plus.com/>
> 
> website<http://www.host1plus.com/>
> 
> facebook<https://www.facebook.com/Host1Plus>
> 
> twitter<https://twitter.com/Host1Plus>
> 
> linkedin<https://www.linkedin.com/company/digital-energy-technologies-ltd.>
> 
> 
> 
> 
> Phone: +44 870 8200222
> 
> Fax: +44 870 8200222
> 
> Host1Plus is a division of Digital Energy Technologies Ltd.
> 
> 26 York Street, London W1U 6PZ, United Kingdom
> 
> 
> 

Mime
View raw message