[FX.php List] Google-type search across tables?
Steve Winter
steve at bluecrocodile.co.nz
Wed Mar 28 02:04:08 MDT 2012
Hi Malcolm
Don't hold the API responsible for the behaviour of the Site Assistant ;-)
In the end, with code you wrote yourself, when it comes down to it the difference between the API and FX is negligible (in different circumstances each is marginally faster than the other). They both use the FMS XML interface, and provide a PHP 'wrapper' on top of that - one providing objects of data, the other 'straight' arrays…
So, as long as it's working for you, all good…
Cheers
Stecve
> You may be right. It was my first site with the API and I used Site Assistant. The code produced is a nightmare to look after and I found FX so much easier to use that I didn't look back.
>
> Malcolm
>
>
>
> On 28/03/2012, at 5:52 PM, Steve Winter wrote:
>
>> Malcolm
>>
>> The 'prettifier' that you speak of doesn't, in my experience, happen by default, you need to do two quite specific things to get data out like that, and hence it's really easy to avoid…
>>
>> Formatted text generally requires the getAsCSS script step to convert a field from 'plain text' into HTML (not CSS as the name suggests), and then you need to use the getFieldUnencoded API call to prevent the HTML tags from being turned into their entity encoding…
>>
>> Is it possible that you used 'a tool' like the Site Assistant or something like that to help you build the site, because this is most assuredly not the default behaviour of the API...
>>
>> And as Tim pointed out, the HTML which is returned by the getAsCSS calc step is horrible. It's a miss-mash of HTML tags, old and new, all in upper case, with weird spans, multiple <BR> tags, and no paragraphs… if you do want formatted data then you need to run it through a post-API PHP function to clean it up and get it much more compliant… (can send you an example if you care)
>>
>> Cheers
>> Steve
>>
>>>
>>> The FMP API pushes all search results through a "prettifier" by default. Not good and the very reason that I moved to FX.
>>>
>>> I had built my first web app with FMP API and soon after delivery it broke. I didn't know about the prettifier then. We discovered that our client was using searches that coincided with the key data we were returning. Instead of having a nice list of keys of fixed length and defined structure we had a jumble of HTML.
>>>
>>> I expected:
>>>
>>> CAT001
>>> DOG002
>>> CAT002
>>> ...
>>>
>>> and I was getting
>>>
>>> CAT001
>>> <B>DOG</B>002
>>> CAT002
>>>
>>>
>>>
>>> malcolm_______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> Steve Winter
>> +44 777 852 4776
>> steve at bluecrocodile.co.nz
>>
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120328/3a00aedb/attachment-0001.html
More information about the FX.php_List
mailing list