Welcome Guest, Not a member yet? Register   Sign In
[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition)

[eluser]OverZealous[/eluser]
Oh, one more cool trick (for all IDEs):

Add the attached file somewhere into your project - anywhere will work, as long as the IDE can index it.

Modify it to include every library you use, and you will get code completion from within Controllers!

Make sure to choose the correct prefix (MY_ or CI_) based on whether you customize these libraries or not.

[eluser]NachoF[/eluser]
I wish I could test netbeans but the download rate is at 5KB/s... Im not sure whats wrong with their website cause i seem to be browsing just fine/.... anyone knows an alternate download site?

[eluser]NachoF[/eluser]
Ok, I finally was able to download it... Phil, can you help me a little bit on setting it up?... Im not sure if its possible but I would like to be able to do.. File->New->CI Project.. and have all the CI files already there... what do you think? also.. how do I turn the project I was working in notepad++ into a netbeans project?.. do you store your netbeans projects in the same folder of the http server>? (in my case htdocs)

[eluser]OverZealous[/eluser]
@NachoF
I'm not really sure I can help you set it up. I started with a New Project from existing sources. NB allowed me to put the nbproject folder into a different location. There isn't too much more to set up.

NetBeans might have project templates, but I've never used them. It's really as simple as copying in the CI files, at any rate, and NB will immediately see the imported files.

I work out of a local directory, because I use Subversion to make changes safe, and I never work directly on production files. After a bit of work, I was able to set up my local Apache (included with OS X) and local PHP (also included with OS X, but I had to build and add several features) and point a virtual server to the working directory. This setup is awesome, because I can simply save my file, refresh and I can see it. If you use NB's remote setup, you can do the same thing via FTP or SFTP (by auto-uploading on save).

My project is big enough, however, that I made a custom PHP build file. I won't go into detail, but it lets me run a lint check on all PHP and JS files (catching typos early), compress all images, JS, and CSS files, and then hand it off to Unison to sync across either my Dev, Test, or Production servers as necessary.

[eluser]Oblique[/eluser]
@NachoF
You should go File->New Project->PHP Application with existing sources
and choose dir with your app. After that all your app files should be accessible in projects window and files window.

For more details check out netbeans help and netbeans tutorials on netbeans.org, and maybe even there are some threads about on this forum, use search. This is not the place you should ask about it )

offtop: Poor russians...

[eluser]NachoF[/eluser]
Maybe not specific to netbeans but to datamapper it definitely is....

Phil, sorry to bother again...do you have autocomplete for the get_by_someattribute methods? and related objects??
$user->group... you have autocomplete for that??

[eluser]OverZealous[/eluser]
@NachoF
No. Autocomplete really isn't magic. Basically, look at the top of the DataMapper library to see what I included. I have to hard-code everything that is suggested, and there is no way to suggest fields or methods for subclasses of DataMapper.

I included hints where applicable, such as adding a method get_by_FIELD, but you still need to replace FIELD with your actual field.

If you want more specific suggestions, you'll have to add them for every class.

Beyond that, like Oblique said, this isn't the right forum for discussing NetBeans specifically, or even IDEs.

I think I'm going to package up and release an RC2 for 1.7.0 tonight. I found and fixed a couple more little bugs, and I'll get to renaming the get_large_query method, and updating the documentation for that method. I'm still deciding on the name, but I'm checking to see if I can integrate the streaming results into the existing Iterator method, so the iterator doesn't have to be returned explicitly.

[eluser]OverZealous[/eluser]
Announcing 1.7.0 Release Candidate 2

I decided to go with get_iterated, since it is the most accurate description.

However, the get_iterated method works a lot differently than it did before. The old version required capturing the result of the method call, and iterating over that object specifically. However, I was able to integrate the Iterable directly into the main class, as well as provide seamless access to exists() and result_count() on the same object. Usage now looks like this:
Code:
$countries = new Country();
// get all countries
$countries->get_iterated();

if(!$countries->exists())
{
    echo('No countries found');
}
else
{
    echo($countries->result_count() . ' countries were found.');
    foreach($countries as $country)
    {
        // process like normal
    }
}

I think this is pretty slick! It means switching to the new method is as simple as adding _iterated to your existing code. (The new method now returns $this for method chaining.)

This update includes several bugfixes, the renaming of get_large_query to get_iterated, and there are also two new methods, get_paged_iterated and count_distinct. The manual has also been updated.

Also, the example application now is using get_paged_iterated, so you can see how it works in practice.

Edit: Links are good Smile

Quote:Download the Latest Version Here

View the change log and the upgrade process
Having issues? Please look through the Troubleshooting Guide & FAQs
View the Complete Manual
Search the Manual
(Due to the server's caching configuration, you may need to forcibly refresh your browser to see the changes in the manual.)

[eluser]NachoF[/eluser]
Awesome.. I decided to use it in my app cause Im not (yet) using any of the advanced methods and nothing got broken (and Im using htmlform and still works)... just like to point out though.. not sure if its a bug but in netbeans Im getting "phpdoc not found" for get_by_id() method. Its also not showing that it expects an int $id parameter... not sure if its something with my config but many other methods are working just fine with autocomplete.

[eluser]OverZealous[/eluser]
@NachoF
Sadly, that's is a bug in NetBeans 6.8. I'm almost certain it's already been fixed in the next revision.

(It is also possible that I have the format incorrect, but I matched the PHPDoc format exactly and it works in the PHPDoc parser. I won't know for sure until I can test NB 6.9, but I avoid pre-releases because they sometimes are a hassle.)




Theme © iAndrew 2016 - Forum software by © MyBB