Développement web indépendant à Montpellier

Publié le mardi 19 octobre 2010 16:25:59

IFrame ou Canvas ?

Le premier article de cette section Facebook concernera le premier choix que l'on a à faire lorsque l'on se lance dans le développement d'applications Facebook.

Dans les 2 cas, il y a du pour et du contre. Avant la sortie de la dernière version du SDK Facebook, j'aurai sans aucun doute dit Iframe sans hésiter, aujourd'hui je pense que Canvas est plus approprié dans bien des cas.

Cet article propose de faire un petit benchmark rapide des 2 solutions offertes par facebook.

Application Facebook - Canvas

Je trouve clairement qu'il y a eu progrès. Je ne sais pas ce qui s'est passé depuis quelques mois, mais le serveur répond considérablement plus vite lorsqu'on l'interroge (Application stupide de test du nouvel SDK Facebook que j'ai curieusement appelé Error Document, vous constaterez que ça vole haut ;-) ).

Avantages du Canvas

  • Meilleur affichage : il n'y a pas cet IFrame redimensionnable affreuse que l'on trouve dans les applications IFrame (par ailleurs, il arrive que le redimensionnement déconne dans celles-ci),
  • Utilisation du FBML (ie FaceBook Markup Language) natif exécuté par le serveur, il faut être franc, c'est bien plus fiable et il n'y a pas ce délai pénible d'attente de l'exécution du Javascript pour certaines fonctions (type internationalisation...),
  • Accès au FBJS (FaceBook Javascript),
  • Il reste néanmoins la possibilité d'inclure des IFrames avec le tag FBML <fb:iframe />,
  • Le développement est plus souple lorsque l'on développe en composite.

Inconvénients du Canvas

  • Il reste un peu plus lent que l'Iframe (sentiment personnel),
  • On est obligé d'utiliser le FBJS (je sais, je l'ai mis en avantage...), c'est super chiant à déboguer car Facebook remanie les noms des objets côté serveur, mais ce n'est pas non plus infaisable,
  • Pas d'utilisation de librairies JS externes,
  • Niveau publicité, si vous utilisez Google Adsense, c'est plus chiant à intégrer car vous devrez nécessairement l'inclure dans une frame comme c'est le cas dans mon "Hello world", Error Document.

Application Facebook - IFrame

Avantages de l'IFrame

  • Vous pouvez utiliser jQuery, PrototypeJS ou Mootools pour les amateurs, et à aucun moment vous n'êtes pas obligés de créer des objets FBJS,
  • Il est plus facile d'externaliser une application IFrame (encore que, si le travail est bien fait, ça ne devrait pas être le cas),
  • Vous développez votre application Facebook comme un site web classique, personne ne vous force même à comprendre comment le SDK de Facebook fonctionne à partir du moment ou vous récupérez correctement ce que vous avez à récupérer (ID de l'utilisateur Facebook, nom, prénom etc.),
  • Il est plus simple de communiquer avec la page lorsque l'on envoi des requêtes HTTP avec des animations Flash,
  • Toujours avec Flash, on peut facilement utiliser ExternalInterface...

Inconvénients

  • L'aspect est un peu "buggy", particulièrement si vous utilisez l'API de traductions,
  • Le FBML peut s'exécuter, mais c'est pénible tant ce n'est pas très souple : une seule balise <fb:fbmlserver /> par page me semble -t'il (à vérifier) ce qui peut poser problème dans certains cas : si la marche à suivre pour exécuter du FBML en mode IFrame vous intéresse : FBML dans une application Facebook IFrame
  • De même les éléments FBML ne s'affichent pas directement (et fonctionnent un peu aléatoirement je trouve).

Conclusion

Chacun sa préférence, sachant que l'apprentissage de FBJS et FBML est assez facile. La documentation du SDK est plutôt mal faite je trouve...

Je dirai que cela dépend du projet concerné, je n'ai plus d'opinion arrêtée concernant le choix à faire entre Canvas et IFrame.

Notez cet article !

  • Actuellement 5 sur 5 étoiles
  • 1
  • 2
  • 3
  • 4
  • 5

Note : 5/5 (2 notes attribuées)

Merci d'avoir participé !

Vous avez déjà noté cette page, vous ne pouvez la noter qu'une fois !

Votre note a été changée, merci de votre participation !

Bonne résolution ! j'arrête d'alourdir mes pages avec des boutons de partage, mais vous pouvez continuer de partager :-)

Commentaires

  1. He said with a smile immediately and grinned: Yes, yes.

  2. Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers.
    http://...se-weight/

  3. Thank you for sharing this useful information. The article provides a lot of meaningful knowledge, I enjoyed

  4. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
    http://...-loans.com

  5. I am impressed with this web site , really I am a big fan .

  6. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.
    http://...lifestyle/

  7. If there are many sad stories, share it with the people you trust. Sharing helps people get closer together and you also relieve some of that sadness.

  8. I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!
    http://...owdown.com

  9. I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!http://...owdown.com

  10. hipster-v... | hipster-vintage-and-indie |

    Howdy, May I grab that photo and usage it on my website?
    http://...-indie.com

  11. I think this is an enlightening post and it is extremely helpful and learned. hence, I might want to thank you for the endeavors you have made in composing this article.
    http://...uccess.com

  12. Suraj Sutar | Happy Veterans Day Activity |

    i have found one of the best portal for information i was looking for.

  13. it was a brilliant opportunity to visit this sort of site and I am cheerful to know. much obliged to you such a great amount for allowing us to have this open door.
    http://...ontier.com

  14. nice info.
    kunjungi situs web kita di www.bataknews.online

  15. Thank you for the blog. As a constitutional law expert, I am really impressed to see this informative blog.

  16. Thank you so much! I'm glad to hear this information.

  17. Firestarter app is the magic stick that let you enjoy all the Android content on your fire TV. Firestarter app launches Android apps on Amazon Fire TV.

  18. An Afternoon Tea at The Ritz is something you simply cannot afford to miss! To savor the taste of varieties of tea offered at The Ritz, you must book your sitting at least six months in advance.

  19. Webroot.com/safe- Experience next-generation Security level with Webroot on your all devices. Install and activate webroot from www.webroot.com/safe and don’t forget to run webroot safe scan to feel secure anywhere.webroot.com/safe is a computer security software program for Microsoft Windows users that combine software as a service cloud protection with traditional Antivirus and anti-spyware desktop technologies. Built into the suite is a two-way firewall, a registry cleaner, Email anti-spam, secure browsing, anti-phishing and a password management service. The suite was initially released on July 26, 2010, as the 2011 version of the product.

    http://...t.com/safe

  20. This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.

  21. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

  22. Today we are going to discuss “Download Spotify Premium Apk 2018 Latest Version”
    Music is one of the best things to change the mood.

    https:/...mpkios.com

  23. internet... | internet marketing Lincoln NE |

    Your music is amazing. You have some very talented artists. I wish you the best of success.

  24. This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.

  25. Your music is amazing. You have some very talented artists. I wish you the best of success.

  26. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists.

  27. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

  28. Cincinnat... | Cincinnati water slide rentals |

    Your music is amazing. You have some very talented artists. I wish you the best of success.

  29. Your music is amazing. You have some very talented artists. I wish you the best of success.

  30. Your music is amazing. You have some very talented artists. I wish you the best of success.

  31. Colorado... | Colorado SEO services |

    Your music is amazing. You have some very talented artists. I wish you the best of success.

  32. Your music is amazing. You have some very talented artists. I wish you the best of success.

  33. Ukrayna K... | Ukrayna Kiev Teknik Ьniversitesi |

    Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists.

  34. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists.

  35. tina gold... | greatlovekks@gmail.com |

    COSJJ specialized in tailor made costume making, having been in this field for more than 5 years, we have more than 30 tailors and all the costumes you saw online are custom-made by our tailors, made in daily use standard. The Costumes from COSJJare all hand-made, can be daily used, this is the main difference between our costumes and other fancy dress and cheap mass products.

    Shopping with COSJJ.COM, that means you get the custom costume directly from the manufacturer, No Agent, No middleman between the tailors and buyers. And your special requirements will be passed directly to the tailor who made your costumes.

    We base in China, with top sewing facilities, unique fabrications, laces and trims from over 200 resources, We earned the respect of all our customers, from Japan, Korea, U.S, U.K, Germany, France, etc. We have what you are looking for and more!

    New styles added on a weekly basis. All our products are at very competitive price. We also accept Commission orders. If you are interested in some of the items or place an order from us, please do not hesitate to contact us.

    http://...ostume-669
    http://...d-of-korra
    http://...y-costumes

  36. alcohol t... | alcohol treatment in California |

    This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.

  37. Kiev Tara... | Kiev Taras Şevçenko |

    nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this!

  38. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists.

  39. I am happy to find this post Very useful for me, as it contains lot of information. I Always prefer to read The Quality and glad I found this thing in you post. Thanks

  40. I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates.

  41. small bus... | small business bookkeeping |

    Good post but I was wondering if you could write a litter more on this subject? I’d be very thankful if you could elaborate a little bit further. Appreciate it!

  42. Web-root -24/7 technical support for Webroot antivirus, call us to get instant support on webroot installation issues Dial toll free 1-844-833-0610.
    https:/...-root.org/

  43. Web-root -24/7 technical support for Webroot antivirus, call us to get instant support on webroot installation issues Dial toll free 1-844-833-0610.
    https:/...-root.org/

  44. Experience next generation Security level with Webroot in your all devices. Install and activate webroot from www.webroot.com/safe and don’t forget to run webroot safe scan to feel secure anywhere
    https:/...-com-safe/

  45. Experience next generation Security level with Webroot in your all devices. Install and activate webroot from www.webroot.com/safe and don’t forget to run webroot safe scan to feel secure anywhere
    https:/...-com-safe/

  46. www.webroot.com/safe -24/7 technical support for Webroot antivirus, call us to get instant support on webroot installation issues Dial toll free 1-844-833-0610.
    https:/....org/safe/

  47. Where to seek out webroot Key Code? The Webroot security package is simple to setup &amp; install at webroot.com/safe. Simply find 20-character alpha-numeric code that is...
    http://...-safe.org/

  48. Web-root -24/7 technical support for Webroot antivirus, call us to get instant support on webroot installation issues Dial toll free 1-844-833-0610.
    https:/...-root.org/

  49. Experience next generation Security level with Webroot in your all devices. Install and activate webroot from www.webroot.com/safe and don’t forget to run webroot safe scan to feel secure anywhere
    https:/...-com-safe/

  50. Get the names for your cute baby boy.

  51. Webroot Support experts can lend their hand to download, install and update Webroot Spy Sweeper Antivirus on your system. We can also repair all errors that may crop up while installing and configuring Webroot Antivirus on your PC. We can help you detect and remove malicious threats, malware and spyware by performing a quick scan on all files and folders. With our robust technology, we can destroy suspicious programs and infected files from your system. Our antivirus experts can clean all online threats, including Trojan, root kits, key loggers, and worms in just single sweep. We can optimize your computer’s speed and efficiency and also protect it from being sluggish.

  52. The Webroot security package is simple to setup & install at webroot.com/safe. Simply find 20-character alpha-numeric code that is written on the backside of the retail card. Here may be a sample Product Key to let you understand:
    xxxx-xxxx-xxxx-xxxx-xxxx

  53. Webroot Support experts can lend their hand to download, install and update Webroot Spy Sweeper Antivirus on your system. We can also repair all errors that may crop up while installing and configuring Webroot Antivirus on your PC. We can help you detect and remove malicious threats, malware and spyware by performing a quick scan on all files and folders. With our robust technology, we can destroy suspicious programs and infected files from your system. Our antivirus experts can clean all online threats, including Trojan, root kits, key loggers, and worms in just single sweep. We can optimize your computer’s speed and efficiency and also protect it from being sluggish.

  54. Experience next generation Security level with Webroot in your all devices. Install and activate webroot from www.webroot.com/safe and don’t forget to run webroot safe scan to feel secure anywhere.webroot.com/safe is a computer security software program for Microsoft Windows users that combine software as a service cloud protection with traditional Antivirus and anti-spyware desktop technologies. Built into the suite is a two-way firewall, a registry cleaner, Email anti-spam, secure browsing, anti-phishing and a password management service .The suite was initially released on July 26, 2010 as the 2011 version of the product.

  55. welcome to avg.com/retail website With the development of the digital world, online protection is crucial. It is extremely important to protect your PCs, Mac, computers as well as mobile devices and tablets with avg.com/retail. This can be done with the help of effective internet security and anti-virus products from avg.com/retail that safeguards all devices used on digital platforms.

  56. Visit www.norton.com/setup for setup, download, reinstall, enter and activate your norton product key to setup your account.Step-by-Step guide for Norton setup key, Download &amp; installation from norton.com/setup website.

  57. Free Land... | Free Landing Page Creator |

    I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

  58. It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.

  59. Nice post. I appreciate the tips. My training routine is remarkably similar to yours, although I expect I'm slogging along much more slowly than you

  60. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you.

  61. Thank you for some other informative website. The place else may just I get that kind of information written in such a perfect method? I have a venture that I am simply now running on, and I’ve been at the glance out for such info.

  62. website d... | website designer san diego |

    Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks.

  63. https://n... | https://namsonauto.vn/man-hinh-oto |

    Great post, you have pointed out some fantastic points , I likewise think this s a very wonderful website.

  64. Riviera M... | Riviera Maya real estate for sale |

    This is a truly good site post. Not too many people would actually, the way you just did. I am really impressed that there is so much information about this subject that have been uncovered and you’ve done your best, with so much class. If wanted to know more about green smoke reviews, than by all means come in and check our stuff.

  65. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers

  66. click here for kerala results.kerala.nic.in

  67. Temple Ru... | Temple Run 2 Blazing Shards Hacks |

    Generate Unlimited Resources with Our Newly Released Online Resources Generator Tool its 100% Working and also Free Tool, This is one of the best method.You should try this!. Enjoy it!

    https:/...rds-hacks/

  68. The aim of the AP Board is to provide the best educational values to the students of Andhra Pradesh

  69. sf@gmail.com | brian holm lawyer san diego |

    Eloquently composed and well thoroughly considered.

  70. petterson | dissertation writing services |

    This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.

  71. Writing a... | Writing a Legal Case Study |

    I’m really impressed with your article, such great & usefull knowledge you mentioned here

  72. Thanx for sharing such useful post keep it up :)

  73. Your post is well detailed and well understood. Of a truth, there are many of the points mentioned above am coming across for the first time but I clearly understand it. I hope someday you'll continue posting.

  74. On this amazing accident you can Free Download Happy New Year 2018 HD Wallpapers, Images from our website page.


  75. These are the most common tonsil stones symptoms you should look out for.

  76. whatsappl... | WhatsApp Life | Refreshing Your Knowledge |

    Download WhatsApp Messenger for Android free fast and without virus.

  77. <a href="http://...ot;>why do we celebrate veterans day</a> if your true patroit than check out <a href="veteransdayguide.com/happy-veterans-day-images-2017">veteransdayguide.com/happy-veterans-day-images-2017</a>

  78. instagram... | instagram login with facebook |

    How to instagram login with facebook account online.Your instagram sign in with facebook account are automatically linked as soon. instagram login with facebook.download instagram app for pc.

  79. mahfudsid... | Nutrisi Tanaman Herbal Untuk Kecantikan Kulit Dan Wajah Secara Alami |
  80. mahfudsid... | Nutrisi Tanaman Herbal Untuk Kecantikan Kulit Dan Wajah Secara Alami |

    <a href="https:/...>Gejala Asam Urat</a>
    <a href="https:/...gt;Tanaman Bagi Penderita Asam Urat</a>
    <a href=" https:/...gt;Makanan Untuk Penderita Asam Urat</a>
    <a href="https:/...t;Penyebab Asam Urat</a>

  81. Thank you for your post quality articles and may be useful for many people.
    http://...ri-wanita/
    http://...angkangan/
    http://...angkangan/

  82. Download Mobdro for iPhone, iPad, iOS App. It's very easy to get Mobdro on iPhone. Download Mobdro for PC or Windows Computer is here.

  83. home reme... | home remedies for ear piercing infections |

    I think this is a really good article. You make this information interesting and engaging. (home remedies for ear piercing infections) You give readers a lot to think about and I appreciate that kind of writing.

  84. esmeerose... | left flank pain under ribs |

    wow, great, It is wonderful content has been published at this plat form. Now own words needs to know any informative information then will absolutely recommend your website where can accurately knowledge can consider.

  85. adawiyahk... | Manfaat Air Cucian Beras Bagi Kesehatan |

    Good afternoon, great article thank you for sharing
    <a href="http://...gt;manfaat air cucian beras bagi kesehatan</a>

  86. es file e... | es file explorer apk download |

    Free, Safe, Simple, Manage your files efficiently and easily with ES File Explorer

  87. I highly recommend you continue on the following superb deliver the results plus I actually look ahead to extra within your magnificent content.

  88. http://di... | http://diherbal.com/obat-herbal-asma-alami-ampuh/ |

    I've learn some excellent stuff here. Certainly price bookmarking for revisiting. http://...ami-ampuh/

  89. http://di... | http://diherbal.com/obat-herbal-hiv-aids-aids-ampuh/ |

    Hello, Neat post. There is a problem with your web site in internet explorer, may test this? IE nonetheless is the market chief and a huge section of people will pass over your wonderful writing due to this problem. http://...ids-ampuh/

  90. http://di... | http://diherbal.com/produk-herbal/amazon-plus/ |

    certainly like your web site but you need to take a look at the spelling on several of your posts. Many of them are rife with spelling problems and I find it very bothersome to tell the reality however I will certainly come again again. http://...azon-plus/

  91. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article

  92. Official Download <a href="http://...gt;shareit for windows</a>, Android, iOS, And Windows Phone. You can SHAREit App download for PC, Lenovo, Laptop.share it latest version.

  93. so there is an app called <a href="http://...t;download kingroot</a> which will root your device just by installing the application and you need an internet connection.

  94. http://bl... | http://bliherbal.com/obat-kista-herbal-alami/ |

    I been very encouraged to find this website. I desired to thanks with this special study. I certainly savored each and every that and I've you bookmarked to look at fresh things you publish.

  95. http://bl... | http://bliherbal.com/obat-asma-herbal-alami/ |

    I probably appreciating every of it. is truly an incredible and very good impart. I need to much obliged. Great employment! You all an incredible page, and possess some extraordinary substance. http://...bal-alami/

  96. http://bl... | http://bliherbal.com/obat-herbal-kolesterol-tinggi-alami/ |

    I am currently working on an assignment and I have been exploring your blog site for a couple of hours. I'm appreciate your the idea proved useful for me. http://...ggi-alami/

  97. Take your music anywhere. Spotify for Android is a great application that will allow you to download.

  98. Play kids flash games free online at

  99. Good tutorial, had some problems with the iframe of my score hero generator but its fixed. Useful information are given here.

  100. Whenever I go from home or running errands to work I always kick myself that I can't continue to use iMessage for PC when I want to chat with ...

  101. Buy Microsoft Outlook 2017. With a clear view of email, calendars, and contacts, focusing on what's important is easier than ever.

  102. ailsaalan... | online paper writing service |

    Great tutorial! I really enjoy working with Wordpress, because there are great people ready to help.

  103. mouai c'est intéressant le canva quand meme

  104. Le FBML a été abandonné.

    Bruno et koki = ça spam sec ...
    Sur plusieurs blogs on retrouve le même type de message en commentaire pour cette application.