Is it valid to make Ruby Gems an analogy to Java JARs? -


I believe I have kept this question quite clear and concise. Why should i ask

I am explaining the Ruby structure to students on Ruby and for this, I must make some conformity with the Java world (as is absolutely Java-centric). I have no experience with Ruby on the railway, but I think the resemblance of gem / jar is a valid one.

Can anyone be more focused on this issue?

As a brief answer, I will say: Yes, it is valid.

As a long answer, I will say: Yes, it is valid, but there are some important differences which you can also describe.

There are some qualities in a jar that are very different from a gem. JARs are packaged as executable libraries, which you generally want to declare a dependency in the execution of Java programs on time of charge (when you invite the Java interpreter, the form of a dependency By declaring jar in the jar) there is a bit of structure in the jar, which is applicable in addition to some well-defined locations for files (like directories Structure should mirror the package path).

A gem is a descriptor to permanently establish a library for a system. Package of functionality available to declare a dependency during runtime, as a part of the definition of a gem, a strict version Syntax is, and gems are distributed by some centralized treasures, which spend a decent amount to ensure uniqueness in the names of the gem. Gems can clearly declare their reliance on other gems. (Unlike the jar where you will have to make sure that you do not take responsibility for the issuance of the declaration or the resolution for all the frequencies, and the jar does not explicitly take responsibility for the issuance of the jars). Additionally, some optional functionality built into the gem tool can be quite convenient, for example, if a user wishes to "run the gem" then one can declare a default executable for the gem, and you can test a unit Suits can be declared for a gem, a user who establishes a gem can ensure its functionality.

In addition to this, you can tell your students that Ruby Games is an instrument made independently of Ruby language, and after this the benefit is to develop many inconveniences and complaints generated from the management of the jar. It was from years of development.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -