Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,757 members, 7,824,172 topics. Date: Saturday, 11 May 2024 at 02:32 AM

New Bucketjs Library For Javascript Released - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / New Bucketjs Library For Javascript Released (1209 Views)

How Can I Build An E-library For School? / Challenge For Javascript Beginners/intermidiate (2) (3) (4)

(1) (Reply) (Go Down)

New Bucketjs Library For Javascript Released by heywhy824(m): 3:38pm On Aug 25, 2016
I' m happy to release the first version of BucketJS project which was built with my little knowledge of JavaScript. I will appreciate and be more happy if you guys can help review it. Critics is allowed for that's what keeps us on our toes.
You can download using composer require heywhy/bucketjs or download through github https://github.com/heywhy/BucketJS thanks.
Re: New Bucketjs Library For Javascript Released by heywhy824(m): 8:47pm On Aug 25, 2016
Waiting for reviews...
Re: New Bucketjs Library For Javascript Released by Nobody: 9:48pm On Aug 25, 2016
heywhy824:
Waiting for reviews...
I will do a review, but later..
However, I am pleased with the Open-Source movement around here..Good job.
Re: New Bucketjs Library For Javascript Released by heywhy824(m): 10:26pm On Aug 25, 2016
DanielTheGeek:


I will do a review, but later..

However, I am pleased with the Open-Source movement around here..Good job.
Thanks man.
Re: New Bucketjs Library For Javascript Released by heywhy824(m): 7:55am On Aug 26, 2016
Waiting for reviews please...
Re: New Bucketjs Library For Javascript Released by larisoft: 3:36pm On Aug 26, 2016
thumbs up, bro. Its not easy to write code with that mindset that the public will read it

The minor criticisms I have are:

1. Both your github readme file, and your post here fail to define the exact unsolved problem this library addresses. You seem to assume that we will be interested in reading your code just because you wrote it, but as you can see, I am probably the only person who had that much interest. Please do something about that. 'preventing polluting your window object... and managing your javascript files' is just too vague.

2. The github link you shared is not pointing to the repository. I had to search for it myself. I imagine very few 'reviewers' and potential contributors are that patient.

3. Your comments are a little scanty.

I know these can be easily implemented since the main work is quite okay (atleast, the way I read it). Good job.

1 Like

Re: New Bucketjs Library For Javascript Released by heywhy824(m): 3:51pm On Aug 26, 2016
larisoft:
thumbs up, bro. Its not easy to write code with that mindset that the public will read it

The minor criticisms I have are:

1. Both your github readme file, and your post here fail to define the exact unsolved problem this library addresses. You seem to assume that we will be interested in reading your code just because you wrote it, but as you can see, I am probably the only person who had that much interest. Please do something about that. 'preventing polluting your window object... and managing your javascript files' is just too vague.

2. The github link you shared is not pointing to the repository. I had to search for it myself. I imagine very few 'reviewers' and potential contributors are that patient.

3. Your comments are a little scanty.

I know these can be easily implemented since the main work is quite okay (atleast, the way I read it). Good job.


Thanks man, I really appreciate the time you spent on it, still working on the readme aspect so as to mak .more explanatory as possible. I'm sorry for changing the repository and not updating it here, sorry man. Atleast getting a response from you its okay and make me more confident in devoting some time to the project.
Re: New Bucketjs Library For Javascript Released by heywhy824(m): 12:41pm On Sep 03, 2016
I'm happy to release the first official release of the BucketJS library version 0.1.0.
The aim of the library is to implement namespacing system which is present in languages like c++, php and so on. I hope you guys can help embrace it and improving.
Because having a class or context per file makes you more organized and its always easy to amend errors since you know the class having fault, you just go straight to file to fix it.

I will be more happy if you all can embrace the concept. behind the library. I will like you all to give your comments for that's what help in improving the library.


# BucketJS Library
* it tries to help you make your codes well organised i.e. a class per file
...* var control = Bucket('App/Core/Controller') matches app/core/controller.js file in the base directory.
...* Bucket(['App/Game'], function(){
this.init = function(){
console.log('game started');
}
}); // matches www/app/game.js
...* you will find some examples below
* trying to implement Namespacing in the other languages
* Include the src/Bucket.js file in your page and you are set to use it.
* The dist directory consists of the different aspects implemented into the library

it is very simple to use
/**
* the files are fetched from a default folder App e.g. www/app, www/js/app
* you can also set the base directory where the app folder is
* e.g. Bucket({fetch: true, base: js/app/});
* it will fetch the files from www/js/app directory
*/

// to define a class, the classname must match the path to the file
// file: www/app/core/hello.js
Bucket(['App/Core/Hello'], function(){
this.call = function(){
alert('hello world');
}
});

// file: www/index.html including the library
// to get the instantiated copy
var hello = Bucket('App/Core/Hello');
hello.call(); // 'hello world'

/**
* defining a class with dependencies to other classes
* a class can have as many dependencies as possible but they will all
* be passed as parameters in the order they were declared to the class depending on them.
* if a dependency depends on another class they all get passed for the library
* is smart enough to sort that.
*/
// file: www/app/core/welcome.js

Bucket(['App/Core/Welcome', ['App/Core/Hello', 'App/Core/Bye']], function(hello, bye){
// the hello param will be an object of App\Core\Hello::class
this.welcome = function(){
hello.call();
}

this.bye = function(){
bye.bye();
}
});

// file; www/app/core/bye.js
Bucket(['App/Core/Bye'], function(){
this.bye = function(){
alert('Thank you for trying me out. Courtesy: BucketJS');
}
});

// file: www/index.html including the library
// to get the instantiated copy
var app = Bucket('App/Core/Welcome');
app.welcome(); // => 'hello world'
app.bye() // => 'Thank you for trying me out. Courtesy: BucketJS'

composer: require heywhy/bucketjs
github link:
https//github.com/heywhy/BucketJS


when defining a class if 'App' is not part of the definition it assumes that the namespace is a subpath in tbe app directory. e.g
Bucket(['Core/Hello'], function(){
this.call = function(){
alert('hello');
}
});

defaults to App/Core/Hello.js, if 'App' was included it is omitted before requiring the file;

if a file has been require before it gets cached, while subsequent calls to file will be fetched from the cache instead of requesting it from the server, which can be an overkill.
Re: New Bucketjs Library For Javascript Released by heywhy824(m): 6:27pm On Sep 03, 2016
@larisoft
Thanks for the review the other time, please I will like you to kindly help review this update. I will be waiting for your feedback, thanks.

(1) (Reply)

16 Interesting Secrets About Mark Zuckerberg / Part Time $3/hr / CI From PC To Bitbucket To Jenkins To Docker To Ubuntu VPS Running Nginx Block

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 34
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.