mageekguy / east Goto Github PK
View Code? Open in Web Editor NEWImplementation of several PHP classes using east compass.
Implementation of several PHP classes using east compass.
Hi Frederic,
Here are some comments as requested and please keep in mind that I don't know
PHP well, although your code is clear I can understand it.
You reference a Steve Job's paper/problem. Can you give me a reference so I might understand the problem better? Without this knowledge my comments are a little superficial.
As far as East is concerned:
You have made a good starts with methods like 'ifKeyMatch' in lock.php
In this method if the keys match you call the callable.
What if they don't match? Give a default second argument callable, one for 'if there is a match' and one for 'if there isn't', the negative case taking the default argument of a no-op function.
Then you can always use the positive case (a match) and only when necessary add the second parameter for when there isn't a match.
This approach can be applied to multiple methods in your project.
With the lock object it appears to me that lock.takeKey is actually asking the lock to keep a key. Is this correct?
Why do you ask a lock to take a key and not a key to give to a lock?
Both approaches are valid but ask yourself what happens when you turn this around and ask a key to do the work. Maybe it makes more sense to ask the key and pass a callable. This method could then be called internally reducing the amount of code you have.
One thing to always keep in mind with East is why am I adding this method, is it to achieve an outcome that is more than just get/set and if it is only get/set then it is probably not worth adding because you are not adding behaviour that models the world and encapsulates it.
I think in general without knowing the problem definition (Job's paper) it is hard for me to comment further but it looks like a good step East.
How do you feel about the structure and usefulness of the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.