Ballerina-lang: [Suggestion] Ballerina Central could be redefined

Created on 10 Jul 2018  路  3Comments  路  Source: ballerina-platform/ballerina-lang

Description:
Ballerina is a great programming language. But managing packages with it not such great in my opinion.
For example the user needs to login with either their github account or the google account and then you will get the ACCESS TOKEN for pushing into the central. Then you need to put that file in Settings.toml.

In my opinion this is process can be automated. Best example is Node Package Manager(aka NPM).

  • NPM is a standalone application which mainly focus to manage packages
  • NPM allows to login in the command line when you needed to push
  • NPM also allows to create accounts on the fly
  • NPM allows to do more keeping Node executable to do only one thing, execution of the code like java, python does
  • NPM do more

My suggestion is that Ballerina should be an easy tool for everyone.

  • Separate Ballerina from the other tasks and mainly focus it to run programs and build executables
  • Create a new program called Ballerina Package Manager(aka BPM) to serve purposes like creating packages, projects, pushing and pulling etc.
  • Allow BPM to login from the command line rather than creating Settings.toml manually in the usr directory

These things will make the software more awesome in my opinion. If user has to less care about these things and they should be able to focus on more coding in my opinion.

Steps to reproduce:

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):
feature, enhancement

Suggested Assignees (optional):

AreCentral TypImprovement

Most helpful comment

Hi @kasvith ,

Thank you for your interest in Ballerina.

It is not mandatory for a user to create the Settings.toml file. If you dont have a Settings.toml file and if you try to push, the CLI will open up the browser automatically where you login. The Settings.toml file will get created automatically where your token will be there once logged in. The only mandatory step is that you have to login using github or google.

Our 'Packerina' specification supports creating ballerina projects, push packages, pull packages already. We are a bit similar to docker hub. In which it supports only for docker images and nothing else. What would be the advantage of separating it from ballerina ?

However theres a few improvements to ballerina project structure that would come in the future.

Regards,
Hemika

All 3 comments

Hi @kasvith ,

Thank you for your interest in Ballerina.

It is not mandatory for a user to create the Settings.toml file. If you dont have a Settings.toml file and if you try to push, the CLI will open up the browser automatically where you login. The Settings.toml file will get created automatically where your token will be there once logged in. The only mandatory step is that you have to login using github or google.

Our 'Packerina' specification supports creating ballerina projects, push packages, pull packages already. We are a bit similar to docker hub. In which it supports only for docker images and nothing else. What would be the advantage of separating it from ballerina ?

However theres a few improvements to ballerina project structure that would come in the future.

Regards,
Hemika

If that is true then seems reasonable, i was following Tour Of Ballerina and in it we had to manually create files.

Seperating it from main binary IMO is like a Seperation of Concerns.

Docker is a tool, not a programming language imo, it does what it supposed to do. Pushing/Pulling to Docker Registers is a part of requirement i guess.

This is just a personal opinion, nothing more.

I see developing them seperately allows ballerina to do focus on execution, while bpm handles other tasks.

Recently i saw google golang developing a tool call dep, just entirely for manage packages.

What i was thinking about something like this, though it's only just a personal opinion only :)

Would like to see this get better n better

We will definitely work on improving ballerina including the packaging aspect with time and also considering your suggestions.

Was this page helpful?
0 / 5 - 0 ratings