Welcome Guest, Not a member yet? Register   Sign In
MeNeedz Search
#11

[eluser]hugle[/eluser]
[quote author="waldmeister" date="1233381868"]
...cut...
Have you ever had to build a search function for a page?
...cut...
[/quote]
Hello waldmeister !
I am trying to build a search right now Smile
You library seems very interesting Smile

When I came up to make'ing a search, I remembered that I saw a 'MeNeedz Seach' in the signature Wink)

But have one problem Smile
I have one table, and some rows I need to perform search in:
pav, apr, apr2, aprs
And if search returns true, I need to get and `id` of this row...

Is it easily done with your library ? Smile

thanks you so much !

You make a great effort to CI community Smile

big thanks to you !
Jaroslav
#12

[eluser]davidbehler[/eluser]
That's exactly what my library does. It performs a search on a table (or multiple tables if the needed join is defined in the config) and then returns a list of ids taken from the specified search_id_field.

I'm gonna set up an example that shows how to perform a search.
#13

[eluser]hugle[/eluser]
[quote author="waldmeister" date="1235259640"]That's exactly what my library does. It performs a search on a table (or multiple tables if the needed join is defined in the config) and then returns a list of ids taken from the specified search_id_field.

I'm gonna set up an example that shows how to perform a search.[/quote]


It would be really nice to see a working example.
Cause currently being playing with your lib, and' can't start to wait using it Sad

Have no luck yet to set it up and running.

cheers mate !
#14

[eluser]hugle[/eluser]
I would also like to know, if smth I describe, would be easy integrated:

I would like ti have some aliases, for example:
a = ą, or even:
u = ū = ų;
s = š = sh;
etc, I think you have gotten my mind?

Thanks for you time!
Jaroslav
#15

[eluser]NZmuzzer[/eluser]
yes, an example would rock. Cheers
#16

[eluser]meteor[/eluser]
I have a question related to your code ...
Would it be possible you to place unit tests of your libraries together with them too ...
Honestly, sometimes it is easier to evaluate quality of code checking test first ...
This is just my opinion.
Thanks for your efforts Wink)
regards
demaio
#17

[eluser]davidbehler[/eluser]
What exactly do you mean by "unit tests"?
Examples of how to actually use the libraries?
#18

[eluser]pistolPete[/eluser]
[quote author="waldmeister" date="1235452389"]What exactly do you mean by "unit tests"?[/quote]

CodeIgniter e.g. has a Unit Testing Class:
Quote:Unit testing is an approach to software development in which tests are written for each function in your application. If you are not familiar with the concept you might do a little googling on the subject.
#19

[eluser]davidbehler[/eluser]
Well, I know what unit testing is, but it's something you use when developing a library, not when showing someone how it works...atleast that's what I think...
#20

[eluser]meteor[/eluser]
well, you produce a lot of code, part of which contains libraries. I think it is good idea to make unit tests availeable with them ... I use ruby on daily basis,I have coded using it for years, it is standard to provide tests for every single gem you want to submit in ruby world,and I'm used to do so. Those just prove that libraries do what they are supposed to do.
I'm always a bit unsure as to quality of code of libraries when they come without tests. This is just my long-lasting habit to run test before I start using actual code ...
Another important thing is that people sometimes change code they get, some methods can be buggy, need extensions etc. without corectly written test, changing existing libraries can be a tricky and time-consumming task. I will not mention situations when you get a working website which breaks at some point, without test you have one less possibility to check which part is broken. Even if you fix the bug you are still unsure if your patch not breaks something else until you run full suite of tests for the library ...

Unit testing is clubfooted in code igniter, I have never touched it after learning how it works. But still there are a few good options, for exaple simple test, not the best solution but works,besides PHPUnit provides everything to test libraries properly under code igniter as well.

All in all, libraries containing tests are much more complete, trustworthy and easier to maintain. Frameworks based on MVC pattern are difficult to test correctly, especially controllers but this is not the case with libraries which are standalone pieces of code very often.
In ruby, quality of code is measured by quality of tests provided with libraries quite often, this is very good practice which proven successful many times to me, in PHP providing tests with libraries is even more important because the language itself is much more verbose and it is easier to forget about something when conding. Besides i hate experimenting with new libraries using a project I'm coding, test files are teh right place to do it ...

Best regards




Theme © iAndrew 2016 - Forum software by © MyBB