La Web Imágenes Vídeos Maps Noticias Grupos Gmail Más »
Grupos visitados recientemente | Ayuda | Acceder
Página principal de Grupos de Google
OT: Fase v0.8
En este grupo hay demasiados temas que deben mostrarse primero. Para que este aparezca al principio de la lista, debes descartar esta opción para alguno de los anteriores.
Error al procesar tu solicitud. Por favor, inténtalo de nuevo.
marcar
  12 mensajes - Ocultar todos  -  Traducir todo al Traducido (ver todos los originales)
El grupo al cual envías entradas es un grupo Usenet. Si envías mensajes a este grupo, cualquier usuario de Internet podrá ver tu dirección de correo electrónico
Tu respuesta no se ha enviado.
Tu entrada se ha publicado correctamente.
 
De:
Para:
Cc:
Seguimiento:
Añadir Cc | Añadir seguimiento | Editar asunto
Asunto:
Validación:
Con fines de verificación, escribe los caracteres que veas en la imagen siguiente o los números que escuches haciendo clic en el icono de accesibilidad. Escucha y escribe los números que oyes.
 
Michal Tatarynowicz  
Ver perfil   Traducir al Traducido (ver original)
(2 usuarios)  Más opciones 6 jun 2006, 18:27
De: "Michal Tatarynowicz" <tatarynow...@gmail.com>
Fecha: Tue, 06 Jun 2006 16:27:06 -0000
Local: Mart 6 jun 2006 18:27
Asunto: OT: Fase v0.8
Fase is a minimalist VC (View+Controller, no Model as so far) framework
. Roughly it does what Cake does (url passed do dispatcher, parsed into
class+method+params, run and returned).

It's quite simple -- 32 files in 8 directories, including a few CSS', 3
charset translation tables (Polish, but there's more where they came
from), .htaccess (roughly the same as Cake's) and error pages.

To start it up edit two entries in /app/config.php: FASE_DEFAULT_APP
says which controller is taking care of the homepage, and
FASE_DATABASE_CFG which describes the database connection (optional).

There's a few ideas in it, that Cake could benefit from (if it doesn't
already, I don't follow the development of Cake anymore).

- All CSS and JS files are parsed with PHP by default. This not only
allows for portable web apps, but also allows for include()'s in CSS
and JS (which they sadly lack) and constants in CSS ( .Foo { color:
#5870a2 } can become .Foo { color: COLOR_FUCHSIA } which is far more
readable and less error-prone). Comments and unnecessary whitespace are
automatically stripped in-flight (unless constant DEBUG is true)). I
haven't used it yet on any sites with enough traffic to warrant a
cache, but it wouldn't be very difficult to implement (or you can skip
the thing and link to static files.)

- The database is accessed using a abstract static class DB_Base
extended with a database-specific DB_Mysql (as so far, there's only
MySQL). The database connection resource is kept in a constant. While
this prevents you from using more than one database connection for one
HTTP request, the point here is that you don't have to pass the $DB
variable around any more. Standard helper methods include
  - DB::insert('comments', $data)
  - DB::find_all('users', 'login,password', 'active == 1')
  - DB::delete('posts', 'id = 5')

 - There's a few introspection functions used mostly for debugging and
logging (i.e. each error log entry contains a call stack), notably
caller_file() which returns full path to the file from which the
function that called it was called.
   Take, for example, the insert() function. You can use it to include
views within views (including CSS and Javascript) in much the same way
you use include() for standard PHP. But what makes it quite useful is
that if the insert()ed file is not present, it tries with a relative by
prepending the view file's path to the arguments it received.
Additionally, it figures out the file extension from the callers'. In
example, when from /app/css/default.css you call:

           <?=insert('tools/yahoo_fonts')?>

...by the lack of slash it figures out the path is relative, so it
takes the caller's path (/app/css/default.css) and extracts the context
(/app/css) and file extension (.css) from it. It then tries to load the
file as usual.

What's more, this makes it easier to provide:

 - Automatic multiple output types handling -- appropriate headers are
sent, and appropriate views are parsed depending on what output format
is expected. The default output type is HTML, but that's configurable
(per-controller). When you call, say

           www.example.com/posts/list

by default HTML from /app/posts/list.html (a PHP script) is returned
(if it exists). But if you add a different file extension:

           www.example.com/posts/list.rss

The latter call uses the same controller and method as the former, but
renders /app/posts/list.rss (which in reality is also a PHP script) as
its view. More so, insert()'s are output-type-agnostic, so  an
_insert('item')_ tries to insert a .html file if called from a .html
file, and an .rss file with the same base name if called from a .rss.
With proper application code (which is not really difficult to develop)
providing an alternative output option is as easy as adding another
view of the same data.

  - Debugging, logging and testing functions are in place and ready to
be extended. Tests are to be kept together with the libraries they
test, so that it's less painful to actually write any.

 - And more :)

I wouldn't actually recommend anyone using it commercially (it's a
beta), but if you're a developer who likes to experiment a bit, Fase
provides a small-footprint, unrestricting framework for applications.

Download from: http://sputnik.pl/dev/labs/fase/fase_0.8.zip

Most of the files are licenced under the MIT licence, and files which
don't specify a license are in Public Domain. Please let me know if you
[use|like|hate] it.

Michal Tatarynowicz aka Pies.


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
nate  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 01:09
De: "nate" <nate.ab...@gmail.com>
Fecha: Tue, 06 Jun 2006 23:09:59 -0000
Local: Mié 7 jun 2006 01:09
Asunto: Re: OT: Fase v0.8
For those of you who don't know, Michal Tatarynowicz (aka Pies) is the
original author of CakePHP.

    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
John Zimmerman [gmail]  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 01:20
De: "John Zimmerman [gmail]" <john.z...@gmail.com>
Fecha: Tue, 6 Jun 2006 16:20:55 -0700
Local: Mié 7 jun 2006 01:20
Asunto: Re: OT: Fase v0.8

On 6/6/06, Michal Tatarynowicz <tatarynow...@gmail.com> wrote:

> ...

> - All CSS and JS files are parsed with PHP by default. This not only
> allows for portable web apps, but also allows for include()'s in CSS
> and JS (which they sadly lack) and constants in CSS ( .Foo { color:
> #5870a2 } can become .Foo { color: COLOR_FUCHSIA } which is far more
> readable and less error-prone).

I think something like this  would be excellent for  cake.  I was wishing I
had something like this the other day when altering CSS files after copying
a couple from one application to another.

    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
nate  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 02:25
De: "nate" <nate.ab...@gmail.com>
Fecha: Wed, 07 Jun 2006 00:25:01 -0000
Local: Mié 7 jun 2006 02:25
Asunto: Re: OT: Fase v0.8
Yeah, that struck me as very clever also.  The thing is, even with
caching, running everything including static requests through the
Dispatcher, as fast as it is, is still a little expensive.

I'm thinking of trying a bootstrap-based proof-of-concept if no one
beats me to it.


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Michal Tatarynowicz  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 03:04
De: "Michal Tatarynowicz" <tatarynow...@gmail.com>
Fecha: Wed, 07 Jun 2006 01:04:32 -0000
Local: Mié 7 jun 2006 03:04
Asunto: Re: OT: Fase v0.8
If you want to, you can use Fase just for Javascript and CSS. Put
Fase's files in Cake's /app/webroot/fase and point the browser at it.
Assuming that your Cake app lives in www.site.com/foobar/ , this link:

<link rel="Stylesheet" type="text/css" href="/foobar/fase/css/default"
media="screen" />

...is answered with parsed contents of
/foobar/fase/app/css/default.css, and this:

<script type="text/javascript" src="/foobar/fase/js/foo"></script>

...gets parsed contents of  /foobar/fase/app/js/default.js

I strongly recommend keeping the default styles provided with Fase:
they include Yahoo's CSS Fonts which helps to keep font sizes
consistent between different browsers and CSS Reset which zeroes all
the different default paddings, margins and aligns. Also included is a
brilliant hack to clear floats without any additional markup and a fix
for IE's problems with paddings on <input type="button"> and <input
type="submit">


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Olivier Percebois-Garve  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 03:19
De: Olivier Percebois-Garve <perceb...@gmail.com>
Fecha: Wed, 07 Jun 2006 03:19:50 +0200
Local: Mié 7 jun 2006 03:19
Asunto: Re: OT: Fase v0.8
On my application, I have made a few links to the controller
"categories" instead of doing "categories/index".
Cake calls by default the index method, so I get the page I wanted.
But the links to images in my css and js files are broken.

I know I could handle this with routes but I like such default behavior.

Would Fase be a good answer for this or am I again completely out-of-topic ?

Olivvv


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Michal Tatarynowicz  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 04:42
De: "Michal Tatarynowicz" <tatarynow...@gmail.com>
Fecha: Wed, 07 Jun 2006 02:42:27 -0000
Local: Mié 7 jun 2006 04:42
Asunto: Re: OT: Fase v0.8
I might have :)

At http://sputnik.pl/dev/labs/wd/ I've put up a small fragment of an
application I am rather sure I'll forget about sooner than later, that
uses a file-based cache for HTML. I've used .htaccess to make Apache
check for the cached file without starting-up the PHP runtime:

<IfModule mod_rewrite.c>
   RewriteEngine On

   # Trailing slash fix
   RewriteCond   %{REQUEST_FILENAME} -d
   RewriteRule   ^(.+[^/])$   $1/

   # Homepage
   RewriteRule ^$   data/index.html

   # URLs with parameters are never cached
   RewriteCond %{THE_REQUEST}      \? [OR]
   RewriteCond %{REQUEST_FILENAME} !-s
   RewriteRule ^data/([^\?]*)(\?(.*))*$ data.php?__file=$1$3 [QSA,L]
</IfModule>

The rest of the code is rather uninteresting, but I can send you the
source code if you wish so. The application runs on Ajax, yet it is
rather snappy, despite the slow server it's installed on.

Besides, great most of inefficiencies in web aps are either large-scale
design problems or slow SQL queries. If I make one less bad decision
while designing an app because I'm able to tailor my CSS and Javascript
any way I want, the app will probably be just as fast as if the scripts
and styles were static.

And think of the possibilities. You could cope with browser
inconsistencies at the server, automatically serving IE code to IE's
and FF code to FF's. Instead of client-side conditionals:

      this.target =$(event.target || event.srcElement);

you can do this on your server:

      <? define('EVENT_TARGET', 'event.' . BROWSER == 'IE' ?
'srcElement': 'target')?>:
      this.target = $(<?=EVENT_TARGET?>);

I'd say that this makes code leaner and more compatibile. I for one am
going for it :)


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Michal Tatarynowicz  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 04:45
De: "Michal Tatarynowicz" <tatarynow...@gmail.com>
Fecha: Wed, 07 Jun 2006 02:45:42 -0000
Local: Mié 7 jun 2006 04:45
Asunto: Re: OT: Fase v0.8
I guess it could help, but if you've used Fase for that reason only,
the cost would probably be greater than the benefit. Fase is a
framework in itself and I recommend trying it out. But it's not at all
documented and the learning curve can be a bit steep for someone
without a lot of experience with Cake.

    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
RosSoft  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 7 jun 2006, 10:18
De: "RosSoft" <ross...@gmail.com>
Fecha: Wed, 07 Jun 2006 08:18:53 -0000
Local: Mié 7 jun 2006 10:18
Asunto: Re: OT: Fase v0.8
$this->log pasting ClassName::function() is a good idea

    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Schmidt.Troy@gmail.com  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 11 jun 2006, 19:54
De: "Schmidt.T...@gmail.com" <Schmidt.T...@gmail.com>
Fecha: Sun, 11 Jun 2006 10:54:24 -0700
Local: Dom 11 jun 2006 19:54
Asunto: Re: OT: Fase v0.8
I like the CSS deal.  I have a dsitributed app and it gets tiring going
in and making the same color change all the time.  Plus, if it serves
it without whitespaces that saves time and transfer so it might benefit
even though it is going thru the dispatcher.

My current CSS file is 245 lines and increasing.

Also, another cool thing is that Cake could also provide a obfuscator
with the javascript that further "compacts" the JS code it is sending
out.

In the long run on larger scale applications with large JS and CSS
files having them be PHPitized in CakePHP framework might not be a bad
idea.


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Felix Geisendörfer  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 11 jun 2006, 20:07
De: Felix Geisendörfer <haimu...@gmail.com>
Fecha: Sun, 11 Jun 2006 20:07:39 +0200
Local: Dom 11 jun 2006 20:07
Asunto: Re: OT: Fase v0.8

For the performance part of it. I think you could easily check if the
js/css files md5 hash has changed and if not use a cached version.
That way you wouldn't need to go through the dispatcher. However this
only works if the same js/css include outputs the same js/css
with no dynamic data beeing required.

--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de

Schmidt.T...@gmail.com schrieb:


    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
nate  
Ver perfil   Traducir al Traducido (ver original)
 Más opciones 11 jun 2006, 22:31
De: "nate" <nate.ab...@gmail.com>
Fecha: Sun, 11 Jun 2006 20:31:02 -0000
Local: Dom 11 jun 2006 22:31
Asunto: Re: OT: Fase v0.8
    Responder al autor    Reenviar  
Debes registrarte antes de enviar mensajes.
Para enviar una entrada, antes deberás formar parte del grupo.
Antes de enviar entradas, actualiza tu alias en la configuración de la suscripción.
No dispones del permiso necesario para enviar entradas.
Fin de los mensajes
« Volver a “Debates” « Tema más reciente     Tema anterior »

Crear un grupo - Grupos de Google - Página principal de Google - Condiciones del servicio - Política de privacidad
©2009 Google