Welcome Guest, Not a member yet? Register   Sign In
CodeExtinguisher (Formerly jTaby) version 1.4 Released!
#1

[eluser]Majd Taby[/eluser]
The information in this thread is outdated. Please go here for the latest version of CodeExtinguisher.



CodeExtinguisher - Because sometimes the fire can get out of hand

Good Evening Everybody!

After an arguably long wait, CodeExtinguisher is released. The new version comes with a new layout, improved code base, more extendible plugin system, and most importantly, a website.

Here are the important links:

[links removed because they are outdated]

So please, if you have any suggestions, opinions, anything, just fire up a reply!
#2

[eluser]xwero[/eluser]
Funny how people end up with the same solutions Smile I was working on a form generator myself and i also used yaml and the spyc library. My idea was to set up the yaml so it would produce the view, the controller methods, model (methods) and php/javascript validation. I was thinking that the yaml files would be read out by uploading (local or on the server)

My main concern when i paused the development was allowing none input groups in forms
Code:
<h1>Form title</h1>
<h2>Personal</h2>&lt;!-- this is a none input group --&gt;
<p><label for="name">Name : </label>&lt;input name="name"&gt;</p>&lt;!-- this is an input group --&gt;
Like i mentioned i grouped elements in my yaml file so it looks like this
Code:
-
   group:
     container:
   h1:
     text:Form title
   h2:
     text:Personal
-
  group:
    container: p
  label:
    text: Name
    for: name
  input:
    name: name

I only reached the creating of the view file. Maybe it can give you an idea of some kind.
#3

[eluser]Majd Taby[/eluser]
well, one of the major ideas with codex is that it doesn't generate any code, that's where the flexibility stems from. If it generates views and controllers, and you decide to add a field, you would have to figure out what it generated, and modify it. However, with codex, you would only need to add the definition to the form, then add the field to the db and you're done.

I used symfony to generate a crud, much like codex does, but when my client wanted me to add one single field, I had to rebuild the models, add the sql, modify the views, modify the schema.yml file...it was horrible. That was the main motivation behind codex.

On the other hand, I was planning on adding some form of groupings so that I can use fieldsets, I really like your way. Also, In a future version where I want to generate the sql, I think i'm going to change the form setup (in codex, yaml is optional), to be more concise. My only gripe with your way however, is that it would be difficult to add special parameters to more advanced plugins (see the website and browse through the plugins, like the File plugin for example.

Quote:My main concern when i paused the development was allowing none input groups in forms
I don't really understand the concern, could you expand? Do you mean adding headers (i.e. labels w/o input fields)? You can accomplish that easily with codex, simply by creating your own plugin. There's nothing to it really, it would actually only take you about 10 lines to do it.

EDIT:
In fact, let me show you how easy it is.

Create a file called NoneInput.php in the plugins directory (either system/plugins or system/application/backend/plugins), and put this code in it:

Code:
&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class NoneInput extends jTabyForms
{
    function NoneInput($name,$params) {
        jTabyForms::initiate($name,$params);
    }

    function getHTML()
    {
            $html = $this->prefix;
            $html .= "<h2>{$this->name}</h2>";
        $html .= $this->suffix;
        
        return $html;
    }
}

?&gt;

Then in your form setup, you can simply use it by:

Code:
.
.
.
head_name:
      class:NoneInput
.
.
.

If you have the inflector helper loaded, it'll display &lt;h2&gt;Head Name&lt;/h2&gt; in between your prefix and suffix. Smile
#4

[eluser]aart-jan[/eluser]
Sounds like a really great library! Smile
I get this error on the releasepage of your website:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: header

Filename: views/view_release.php

Line Number: 3

And maybe it would be nice to put a demo on your site. Many developers don't want the hassle of installing it and coding some to try out it's futures, because there are so many libraries around.

And in the documentation it's still called JTaby... Wink

Are you going to fix form validation for PHP4?
#5

[eluser]Majd Taby[/eluser]
haha thanks for catching that, I added it last minute and forgot to copy paste it into the index() Smile
#6

[eluser]Majd Taby[/eluser]
Ah yeah, I just re-read your post. All references in code and documentation still say JTaby (sorry Sad, it's kind of embarrassing. But to redeem myself, it's almost finals week and if i don't release it now i won't be able to release it for another two weeks Smile ) Also, I will be posting a demo soon enough, as well as release the code for the actual website as a public svn repository Smile ... talk about sharing the wealth Tongue
#7

[eluser]aart-jan[/eluser]
That's really great! Smile Sounds like this is going to be a standard library for all my projects! Smile
#8

[eluser]abmcr[/eluser]
Thank you for your work. I have a question: in CodeExtinguisher there is a way to manage data in tables one-more relations? I use actually Rapyd and Rapyd provide a iframefield for managing data of a tbale children from a tabel father. Ciao!
#9

[eluser]Thoer[/eluser]
[quote author="abmcr" date="1196864535"]Thank you for your work. I have a question: in CodeExtinguisher there is a way to manage data in tables one-more relations? I use actually Rapyd and Rapyd provide a iframefield for managing data of a tbale children from a tabel father. Ciao![/quote]
I've talked to Zaatar in private and I'll try my best to help him with this project. One of my main goals is to make CodeExtinguisher support table creation, table checking and basic joins. I think we should all think about it for a moment but my basic idea is to let users define basic CHECKS, REFERENCIES, ON UPDATE and ON DELETE expressions which would be implemented in DB if supported and run from php otherwise. Of course this should be optional because it could couse some heavy overhead.
#10

[eluser]abmcr[/eluser]
Thank you...!!!




Theme © iAndrew 2016 - Forum software by © MyBB