Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite dummy to OOP #12

Open
shadowinek opened this issue Jun 24, 2013 · 1 comment
Open

Rewrite dummy to OOP #12

shadowinek opened this issue Jun 24, 2013 · 1 comment

Comments

@shadowinek
Copy link
Contributor

Hello,

what do you think about rewrite functionality of this library to OOP and use DummyClass instead of direct function calls?

I'm trying to write Symfony 2 Bundle over this library and this should lead to better extensibility and better usage in the future.

To have backwards compatibility it is possible to modify curret functions:

For example:

// dummy.php
$dummy = new DummyClass();

function dummy($a, $internalcall = false) {
  global $dummy;
  return  $dummy->dummy($a, $internalcall)
}

I will try to do this in my fork, but I would like to have your opinion on this.

Regards,
Milan

@kerns
Copy link
Owner

kerns commented Jun 24, 2013

Hi Milan. Good to hear from you.

The function calls are the way they are today to make Dummy code friendly and approachable to non-developers, and/or quasi-developers like me who work almost exclusively in the front-end. So the most important thing is the syntax,... that it's compact, and that it scans easily inside of vanilla HTML without looking too intimidating or out of place, at the same time dropping hints to other team members about what the code is doing – being as expressive, litteral and human readable as it can possibly be. (e.g. You have a <? if (dumb_luck("50%")): ?>50<? else: ?>50<? endif ?> chance!

Show me some examples of how what'd you like to do could improve (not complicate) the syntax and I'm super interested. If it's more complicated then maybe it makes a better fork? What do you think?

Ideally, Dummy would live as a service layer, generating text and serving image assets via an API for many different languages and environments. So PHP, Ruby, Python, whatever could write to the same API...and then be more integrated with envs like Symfony, ...or even ide's like Xcode.

That could also be interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants