Messages - Codebyte [ switch to compact view ]

Pages: prev1 [2] 3 4 5 6 7 ... 29next
6
Mouser,

To answer your original question concerning the much debated "iframe or direct content injection" topic, let me first begin by explaining my own personal experiences.

While at work, I use a total of 3 methods for content injection and asychronous javascript and xml (ajax) calls. The three methods include:
1. Getting a script by creating a new dom element and injecting it somewhere to the page  which forces the clients browser to go get the data. I use this method the most to call php scripts that handle content and echo out javascript. It's ideal for dealing with data clientside (nothing important like passwords etc) but still being able to use server side code because php has access to mysql which can cache your data among other endless possibilities.
2. the traditional ajax methods - creating a new httprequest. i rarely ever use this method anymore.
3. using a combo of YQL (Yahoo Query Language) and #1. - i use this approach the most to scrape data from any web page i need. Yahoo actually caches the results for you which result in faster data returns.

Now you'll notice that none of my methods include iframes. My personal opinion concerning iframes is that they are deprecated. Tons and tons of headaches are created by using methods that include iframes. When traversing the DOM, iframes create more work than necessary. On another note... Iframes are absolutely required when uploading files without reloading a clients browser.

It all depends on your objective... Let me propose an example:

You have a personalized dashboard system for when a customer/user logs in. They have the ability of customizing what "widgets" they want. One customer in particular specifies he wants te latest tweets to display in a beautifully skinned widget box that you've created. the only problem is that you need to get his tweets.

in this example, i would create a few javascript functions to execute when the page is rendering that show a loading bar, use method #1 to create a script element that calls a php file i created to check the last time this users tweets were grabbed. if less than 1 hr ago, i would use mysql to grab the cached tweets and eliminate the extra server connection to twitter (which is overloaded constantly and could result in a timeout or hang.) if the users tweets were grabbed more than 1 hr ago, php can use cURL to grab the new tweets from the server and echo out an object response using JSON so that you can populate the widget with the data the user needs in an easily accsssible manner.

Anyways, let me know if you have questions. I'm uncomfortable typing from my iPhone and can provide more help at a better hour tomorrow ;)

7
hrm, not quite as a popular thread as I assumed. only been a day though. anybody have any comments, questions, sarcasm :) lol

8
great questions!

I think CHM/PDF support would be great for this plugin! It would def. add more flexibility to the plugin. However, adding too much flexibility might stray from the point of the plugin. I think that using an existing indexer might be too much extra fluff for stuff we don't really need, resulting in slower indexing and slower processing?. It might be easier on the developer though. opinions?

9
FARR Plugins and Aliases / [IDEA] FARR Plugin: FARRDevelopersBible
« on: April 27, 2010, 09:28 AM »
Project Name: FARRDevelopersBible
Project Codename: FARRDB

Project Description:
FARRDB will allow developers to enable FARR with an offline developers "bible" that contains descriptions of functions for each language. This allows FARR to quickly search the developers "bible" using a syntax like "fdb php explode". After typing this expression, FARR will search its dev. bible for php functions, find explode, and return a beautiful description of how to use the explode() function, its parameters, a few examples of explode()'s common usage, etc. (Note: explode() is just an example.) When a user types the expression and then hits enter after viewing its usage, FARR adds an example to the clipboard so we can paste it into place and modify as needed.

Reasoning:
I cannot begin to tell you how annoying it is to waste a browser tab to php.net or some other web source. This plugin would be ideal for developers of any age or experience as we all forget syntax every now and then, especially when switching languages on the go (javascript and php are very close.) I was looking for something like this on DC and found FARRWebMetaSearch. While FARRWebMetaSearch is a great idea, the purpose of this plugin is to use an offline version to eliminate the requirement of internet access. Syntax doesnt change, internet access does.

Parts:
This plugin is a HUGE project as it contains several parts: the FARR plugin that handles searching and reading the individual developer "bibles," the actual developer "bibles" themselves and the example usages for functions.

This plugin would be EXTREMELY popular in my honest opinion. It will add alot more functionality to FARR (as if FARR doesn't already have enough functionality - thanks mouser :))

Note: It's probably a good idea to let this post age into maturity before developing this plugin. The reason I am posting this idea and not coding it is due to the fact that I am extremely busy with my web development and side projects as it is, I wouldnt be able to take on another project for awhile.

Please post your ideas for this plugin so we can formulate, as a community, what would be the best way to approach the project, what features to add, and who would be up for coding it :)

Updates:
- [Change] Made FARRWebMetaSearch a link in 'Reasoning.'

10
Developer's Corner / PHP GD Library
« on: February 18, 2010, 01:15 PM »
So question for all you PHP coders out there... I've been writing a class to deal with image manipulations, such as adding watermarks to images etc... Is there anyway to speed up the image load process? I understand this is a very generic question, but i'm hoping it sparks the conversation im looking for :) Thanks for your time!

Pages: prev1 [2] 3 4 5 6 7 ... 29next
Go to full version