Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread ma...@behnke.biz


Johannes Reichardt johannes.reicha...@googlemail.com hat am 30. Oktober 2012
um 16:37 geschrieben:
  In times of testability and several design patters, the use of static calls
  is
  really outdated.
  I understand that you can read and write the invocations of the methods much
  faster, but you should think more to the future on that point.
 I am not sure if that is true for TURBOPY. It has been organically
 grown over the years
 and I had no scenario where I needed instances. The benefit of more
 compact code is worth
 it for this scenario I think. The nature of a server request is still
 very procedural.

Yeah, but when thinking of your TURBOPY as an application, you will come to a
point where changes are neccessary,
They stopped programming procedural PHP for a reason. And they introduced things
like DIC for a reason.

If you want to make sure that your framework works even after changing or adding
somethink, you have to think about phpunit for example.

And if you think about add-ons or mods to your basic classes, you will consider
design patterns that are incompatible with static usage.

If your code will run a longer living CGI process for example, then you will
have to take care that all static members are resetted, otherwise the next user
gets them. That's where objects kick in.

think about it, if you want to make TURBOPY ready for the future.

--
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Adam Richardson
On Tue, Oct 30, 2012 at 7:33 AM, ma...@behnke.biz ma...@behnke.biz wrote:


 In times of testability and several design patters, the use of static
 calls is
 really outdated.
 I understand that you can read and write the invocations of the methods
 much
 faster, but you should think more to the future on that point.


What?

Where is it written that the use of static calls is really outdated?
Functional programming is on the rise, and this is largely because of the
virtues of testability, scalability, and simplified patterns. Using a class
to organize a set of static functions can benefit the code in PHP (allow
for autoloading in PHP because functions can't be autoloaded, essentially
serves as a child namespace, etc.) whilst maintaining the benefits of a
more functional approach (unit testing purely written static functions is
much easier, putting all IO tasks in separate components makes for cleaner
modules, etc.)

I try to emulate functional approaches in PHP, such as what you'd find in
Scala, Clojure, or Haskell, and static calls in PHP can facilitate this
approach.

While OOP is one way to approach programming, it's not the only way. Even
Rasmus has said he leans procedurally:
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com


Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Marco Behnke
Am 31.10.12 18:13, schrieb Adam Richardson:
 On Tue, Oct 30, 2012 at 7:33 AM, ma...@behnke.biz ma...@behnke.biz wrote:

 In times of testability and several design patters, the use of static
 calls is
 really outdated.
 I understand that you can read and write the invocations of the methods
 much
 faster, but you should think more to the future on that point.

 What?

 Where is it written that the use of static calls is really outdated?
 Functional programming is on the rise, and this is largely because of the
 virtues of testability, scalability, and simplified patterns. Using a class
 to organize a set of static functions can benefit the code in PHP (allow
 for autoloading in PHP because functions can't be autoloaded, essentially
 serves as a child namespace, etc.) whilst maintaining the benefits of a
 more functional approach (unit testing purely written static functions is
 much easier, putting all IO tasks in separate components makes for cleaner
 modules, etc.)
I mentioned in an earlier post on the list, why I - and some others -
think, the use of static methods is somehow outdated.

1. If you have code using static methods and members and use phpunit for
testing it, you have to either make sure, that everything is properly
resetted after use OR have to run phpunit in a mode where every test is
run in a single php call for itself. One is potentially harmful to the
test if you forgot some side effects and one is time consuming.

2. When thinking about dependency injection (give everything you use
inside, from the ouside in), show me how one can do this with classes
WITHOUT passing strings around? And without DI, how do you keep your
application flexible to different environments and conditions?

 I try to emulate functional approaches in PHP, such as what you'd find in
 Scala, Clojure, or Haskell, and static calls in PHP can facilitate this
 approach.

 While OOP is one way to approach programming, it's not the only way. Even
 Rasmus has said he leans procedurally:
 http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
Are you serious quoting that post?
Posted by Rasmus http://toys.lerdorf.com/authors/1-Rasmus on Monday,
February 27. 2006


 Adam



-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz



signature.asc
Description: OpenPGP digital signature


Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Marco Behnke
Am 31.10.12 18:13, schrieb Adam Richardson:
 While OOP is one way to approach programming, it's not the only way. Even
 Rasmus has said he leans procedurally:
 http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
Found another interesting discussion on that topic:

http://stackoverflow.com/questions/1185605/when-to-use-static-vs-instantiated-classes

-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz




signature.asc
Description: OpenPGP digital signature


Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-31 Thread Adam Richardson
On Wed, Oct 31, 2012 at 4:46 PM, Marco Behnke ma...@behnke.biz wrote:


 1. If you have code using static methods and members and use phpunit for
 testing it, you have to either make sure, that everything is properly
 resetted after use OR have to run phpunit in a mode where every test is run
 in a single php call for itself. One is potentially harmful to the test if
 you forgot some side effects and one is time consuming.


There are potentially harmful conditions are present in all unit tests.
If there's an error in the test, you find it and fix it, whether it's due
to a failure to reset the static properties, accidental mutation of data,
instantiating the wrong object, etc.


 2. When thinking about dependency injection (give everything you use
 inside, from the ouside in), show me how one can do this with classes
 WITHOUT passing strings around? And without DI, how do you keep your
 application flexible to different environments and conditions?

  I try to emulate functional approaches in PHP, such as what you'd find in
 Scala, Clojure, or Haskell, and static calls in PHP can facilitate this
 approach.

 While OOP is one way to approach programming, it's not the only way. Even
 Rasmus has said he leans 
 procedurally:http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html

  Are you serious quoting that post?
 Posted by Rasmus http://toys.lerdorf.com/authors/1-Rasmus on **Monday,
 February 27. 2006
 **


Yes, seriously, I quoted that post. There is nothing inherently wrong with
a procedural approach to programming, an OO approach to programming, a
functional approach to programming, an AO approach to programming, etc.
Each has there advantages, and not all are available when programming in
particular languages.

When I code in C, I'm not thinking in OO terms. Although I do sometimes use
function pointers in a way that allows me to emulate functional
programming, I'm mostly thinking in procedural terms because the language
affords this.

When I coded in Clojure, I learned to think in immutable terms and embrace
meta-programming.

As I'm learning Go, I'm learning how to think in terms of data and
algorithms involving a clean, convenient separation using interfaces.

When I code in PHP, I tend to take a functional programming approach. But,
I'll sometimes use OOP principles if the situation feels right (although
this is rare.)

Now, back to your comment on DI. DI is cool for OOP, but I don't find I
need it as much when I'm working from a functional programming paradigm.
Others have spoken on the topic of DI in functional languages, but I tend
to use other approaches, such as passing in first-class functions (PHP's
Closure objects create the appearance of this.)

Adam

-- 
Nephtali:  A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com


Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread Johannes Reichardt

 From what I see most of your concepts are not up to date of how you
would do things now.
This starts with simple leave brackets on if else single line
conditions which is from my point of view a no go and ends with using
static calls instead of instances.

Thank you for your feedback.
Especially the static calls improve code quality a lot in my opinion.
But it is different to common standards, I am aware of that.


And why PHP 5.2?

Why not? With some tweaks it would work on PHP4 but for the sake of security
it uses some filter_var methods that are 5.2 specific.


And I am curious if you have developed a real templating engine or if
you are going by eval()? From what I see, it looks a bit like that.
Yes, that is the default. But hardly any impact on performance. For 
Websites with
highest traffic it would be simple to write out the controller code 
instead of storeing it in the db only,

other ways would be stream sockets that allow including of db pages.


But these are only my points. I browsed the pages, had no insight on the
code.

But I like your concept on the in place editing, that looks pretty cool
and handy.
Thank you. Maybe you want to download and install it some time, would be 
glad to get more feedback from you  :)


- Johannes






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread Lester Caine

Johannes Reichardt wrote:

And why PHP 5.2?

Why not? With some tweaks it would work on PHP4 but for the sake of security
it uses some filter_var methods that are 5.2 specific.
And since 60% of the world is still stuck with ISP provided hosting on PHP5.2 or 
less it does 'widen the market' ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread ma...@behnke.biz
Lester Caine les...@lsces.co.uk hat am 30. Oktober 2012 um 11:07 geschrieben:
  And why PHP 5.2?

  Why not? With some tweaks it would work on PHP4 but for the sake of security
  it uses some filter_var methods that are 5.2 specific.

 And since 60% of the world is still stuck with ISP provided hosting on PHP5.2
 or
 less it does 'widen the market' ...

Ok, I can take that point. I haven't installed anything on a shared host for a
while. Always working with VServers.


Johannes Reichardt johannes.reicha...@googlemail.com hat am 30. Oktober 2012
um 10:24 geschrieben:
   From what I see most of your concepts are not up to date of how you
  would do things now.
  This starts with simple leave brackets on if else single line
  conditions which is from my point of view a no go and ends with using
  static calls instead of instances.
 Thank you for your feedback.
 Especially the static calls improve code quality a lot in my opinion.
 But it is different to common standards, I am aware of that.

In times of testability and several design patters, the use of static calls is
really outdated.
I understand that you can read and write the invocations of the methods much
faster, but you should think more to the future on that point.

  And I am curious if you have developed a real templating engine or if
  you are going by eval()? From what I see, it looks a bit like that.
 Yes, that is the default. But hardly any impact on performance. For
 Websites with
 highest traffic it would be simple to write out the controller code
 instead of storeing it in the db only,
 other ways would be stream sockets that allow including of db pages.

The/my problem with eval() comes from a security point of view.

 Thank you. Maybe you want to download and install it some time, would be
 glad to get more feedback from you  :)

Yeah, you known, I love to, but there are 29+some other project I want to do as
well.
For now I'll stick to I am doing right now and try to finish it first ;)



Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread ma...@behnke.biz
Sebastian Krebs krebs@gmail.com hat am 30. Oktober 2012 um 16:20
geschrieben:
 2012/10/30 ma...@behnke.biz ma...@behnke.biz

  Ok, I can take that point. I haven't installed anything on a shared host
  for a
  while. Always working with VServers.
 

 And if you want to take your job serious, thats definitely the way to go. I
 don't think it's useful to give the ISPs a legitimation to stay forever on
 outdated (5.3 exists since 06/2009, last 5.2 is from 01/2011) and
 unsupported (12/2010) (and therefore probably insecure) versions neither by
 tolerating their update-laziness, nor by providing software, that encourage
 their update-laziness. ;) Just my two cent, but really 5.2? 5.5 is
 (loosely) scheduled for Q1 2013 ;)

That is why I go for 5.3 at least.

And would recommend that to everyone, reasons mentioned above!

but I do get the point, that if you want to have customers using your product,
and they have access to 5.2 only, then you have to support it somehow.

But you can also take a look at others projects like TYPO3, they force you to
use PHP 5.3 to be up to date

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread Johannes Reichardt

In times of testability and several design patters, the use of static calls is
really outdated.
I understand that you can read and write the invocations of the methods much
faster, but you should think more to the future on that point.
I am not sure if that is true for TURBOPY. It has been organically 
grown over the years
and I had no scenario where I needed instances. The benefit of more 
compact code is worth
it for this scenario I think. The nature of a server request is still 
very procedural.

The/my problem with eval() comes from a security point of view.
Yes that is true, if you enable the templating language it is not safe 
anymore.

If you take care of that it is ok, but you have to know about it.

Your points are interesting and they let me explain what TURBOPY is not:
Just a framework like the ones you are used to. Its concepts differ a 
lot from
other frameworks, like the idea of accessibiliy over convention for 
example.


With TURBOPY I try to bring back more creativity in the developing process,
allowing you to reach goals in less time.

- Johannes



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-30 Thread Lester Caine

Johannes Reichardt wrote:

In times of testability and several design patters, the use of static calls is
really outdated.
I understand that you can read and write the invocations of the methods much
faster, but you should think more to the future on that point.

I am not sure if that is true for TURBOPY. It has been organically grown over
the years
and I had no scenario where I needed instances. The benefit of more compact code
is worth
it for this scenario I think. The nature of a server request is still very
procedural.

The/my problem with eval() comes from a security point of view.

Yes that is true, if you enable the templating language it is not safe anymore.
If you take care of that it is ok, but you have to know about it.

Your points are interesting and they let me explain what TURBOPY is not:
Just a framework like the ones you are used to. Its concepts differ a lot from
other frameworks, like the idea of accessibiliy over convention for example.

With TURBOPY I try to bring back more creativity in the developing process,
allowing you to reach goals in less time.


I've been in much the same mode with bitweaver for a number of years. We have 
reworked all the code so that it is 'clean' on PHP5.4 but many users ARE still 
tied to ISP's who having tried to move to PHP5.3 they have rolled back to 5.2 
because so many sites simply stopped working! I've been trying to get at least 
some interest in working out what setup of PHP5.3 will continue to run existing 
5.2 code without the problems ISP's are encountering, but in many cases their 
users are not 'code junkies' and just want things to work as they did. Changing 
things in PHP5.3 so they could be killed in 5.4 was somewhat short sighted so we 
are now in a situation where ISP's can't simply wipe out their customers sites 
so they are stuck supporting and unsupported version of PHP :(


As long as PHP5.3 and 4 are installed WITHOUT using the default configurations, 
then one can get most legacy sites working fairly cleanly, but its the messages 
being created in the background that cause an extra load on ISP's and that need 
to be cleaned up again. The problem is that there is no pressing need to switch 
over since the old code IS working fine?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-27 Thread Johannes Reichardt

Hi developers,

I would like to invite you to test a public beta of the hybrid nosql PHP 
framework with IDE
that has been developed by me within the last 10 years (don't be afraid, 
most time it was rebuilt

from scratch to make it more simple).

It contains a lot of new concepts that probably change the way of 
developing and editing websites.
It is build for high performance websites as well as small business 
websites and includes a mongodb
dbal layer for very simple database access. Other features include high 
modularity, lazy loading, a small codebase,
an AJAX interface, a templating language that is so simple that it is 
probably not ok to call it a language.


Other features include:

- CMS features like frontend editing with drag drop sorting
- Filebrowser for quick access of files on your server (including drag  
drop uploading)

- Built in handling of sessions  users and groups
- Content/controller separation
- WYCIWYG, what you code is what you get
- Controller inheritance, simple to change
- Diff tools and optional plugins like object history, advanced register 
and login

- Convinient debugging tools
- Many more - you name it!

You can directly download the beta including testsite here:
http://turbopy.com/beta
If you like watching videos you can check out the channel on youtube:
http://www.youtube.com/user/TheTurbopy
The mailinglist on google is here:
https://groups.google.com/group/turbopy
An interview about the history and ideas of TURBOPY:
http://turbopy.com/blog/interview_jr

Currently TURBOPY is not under the GPL and only open source in the sense 
that you can use
it for free if you use it privately on a non-public server. The legal 
issues are still to be
worked on and will be updated in the future. If you consider buying a 
license there is
an offer especially for this list, using the coupon code CMLISTC you 
save 20%
and another 20% of the price will be donated to Marijn Haverbeke because 
TURBOPY

would be only half as appealing without his wonderful code editor.

If you are interested in joining this project in some way just drop me a 
line. Enjoy!


- Johannes


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] TURBOPY cloud framework + IDE beta available NOW

2012-10-27 Thread Marco Behnke
Am 27.10.12 16:22, schrieb Johannes Reichardt:
 Hi developers,

 I would like to invite you to test a public beta of the hybrid nosql
 PHP framework with IDE
 that has been developed by me within the last 10 years (don't be
 afraid, most time it was rebuilt
 from scratch to make it more simple).

From what I see most of your concepts are not up to date of how you
would do things now.
This starts with simple leave brackets on if else single line
conditions which is from my point of view a no go and ends with using
static calls instead of instances.

And why PHP 5.2?

And I am curious if you have developed a real templating engine or if
you are going by eval()? From what I see, it looks a bit like that.

But these are only my points. I browsed the pages, had no insight on the
code.

But I like your concept on the in place editing, that looks pretty cool
and handy.


-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz




signature.asc
Description: OpenPGP digital signature