Write A Facebook App In JavaScript - javascript

As an hobby I wrote a game in JavaScript and would love to publish it to Facebook, can you write a Facebook application using pure HTML and JavaScript?

Yes. Absolutely. In fact, one of the options for developing a Facebook application is an embedded frame pointing to your website which can be whatever you want, including straight HTML web serving.
There are two officially sanctioned libraries for accessing Facebook information and one of them is Javascript based.
You can do quite a bit on Facebook with just Javascript/HTML. There's a lot of possibilities using services outside of your own site (think Flckr, Google Ajax API etc...)
Facebook applications are pleasantly simple to develop.
The documentation is indeed at:
http://developers.facebook.com/
I would also note that traffic with regards to Facebook, things can spin up really quickly. There are stories of students creating applications which quickly scaled to millions of users. I'm not saying this is likely to be the case for you, but it is can be an effective and a highly viral distribution platform.

Yes, though your app may not be able to do much on Facebook. Have a look at http://developers.facebook.com for documentation.

Related

Most useful javascript design patterns for a single page application that updates with AJAX?

For a beginner (and hobbyist) who is well self-schooled in HTML and CSS and is moderately familiar with JavaScript which design patterns should he learn and apply? My task is to create a single page application without using any libraries or frameworks. It would be a simple site that updates content only in sections of the page as they are clicked. Although it would be a one page web the address bar as well as a menu would mimick a multi-page website. It will not be built as a mobile phone app but may be accessible via one as all web sites are. The goal is use this as learning experience while building an online portfolio. It would likely be hosted at Github Pages which permits AJAX updates. Please advise.
There is an eBook from 2016 called "Build Your Own AngularJS". It will be terribly outdated, but for educational purposes it could be valuable for someone wanting to learn how to handle complexity. It's free to download now, so you could give it a try: https://teropa.info/build-your-own-angular

Can this be site be constructed on WordPress?

I have been approached by someone looking to build a website and was wondering if I could ask the community's advice on how to proceed given I am new to full stack web development.
The website requires :
Visitors to be able to create their own accounts which will have
differing permissions.
Visitors to create their own pages on the website.
An on-site search engine to search through these pages amongst other lists of elements.
The ability to connect with multiple API's including ones I custom build.
On site E-Commerce capabilities
Hosted message boards/forums for "logged in" visitors to use/create/comment on etc.
A content management system
I understand this is an absolutely massive project but I would mainly be creating for enjoyment. My question is, can all these features be implemented by creating the site in word press or will I have to build it from scratch and if so what backend stack would you recommend (I have some experience with NodeJS/express etc and hear keystone JS is a useful library for building a CMS).
That is a massive one of course. Readymade ones like WordPress have limitations, and for this kind of a huge project, customizing wordpress can be tougher than making from scratch on your own. If you are comfortable with php, javascript and mysql, all these, and any huge or small, applications can be made without any hassle, and without any additional fancy platforms and libraries.
Why wouldn't you do this in WordPress? A lot of the infrastructure you desire is already in place. Also with some free plugins, as well as few premium (pay) plugins that I can think of off the top of my head, most of what you list is already developed for WordPress. For me, when I build a WordPress site, the question I ask myself with regards to plugin use is, "If there's a quality plugin that does the job as I need, and I couldn't build a similar function in a reasonable timeframe vs cost of the plugin, then why not use one?"

Download autoloading web pages

This is bugging me, because I'm a complete newbie in web interaction:
How can I download a web page that is dynamically autoloading?
For instance, twitter's feed, facebook's wall, etc. The only restriction is that I'd like to do this on a client, with a background job, no browser involved. I'd prefer to use C#, but any language is completely welcome.
You can try to achieve your goal using a headless browser like phantomJS as discussed here.
Also check if the service you want to get data from offers you an API, which is always a better solution! Accessing websites in an automated way is no good practice.

Creating a printable/downloadable PDF of a web application

I have been searching for an answer to this problem now for several weeks. I also previously tried to research this a few years ago to no avail.
Problem Summary:
My company has developed a web-based data analytics suite for a major beverage distributor. They have recently asked for a feature that allows the user to print or download a visually pleasing version of the rendered app as a PDF. I have had no luck in finding a solid, controllable, or reliable method to do this. I was hoping the stack community might be able to point me in the right direction.
Current Tech Stack:
Plack servers
Perl base on the Dancer framework
Standard web dev front-ends: HTML5, CSS3, Javascript, Jquery/UI
Client is using IE9/10 and Chrome.
Attempted Solutions Summary:
Obviously I started with the window.print() and tried to control what printed using classes and a specialized print.css but the output was still awful.
I looked in to pdfmachine and pdfbox and even contacted Adobe's acrobat development team directly to see if they had an out of the box solution our company could purchase. I was informed that such a product would be counter intuitive to their desired business model of putting an acrobat subscription on each client computer rather than a single server side application.
I have extensively searched the stack articles but did not feel that the articles I found covered what I was looking for.
At present, I am all out of ideas and am hoping somebody out there has had better luck at this than I have.
tl;dr = I need a pdf version of the rendered output of a complex reporting app.
Thanks for your time stack, I appreciate it.
A solution I have used in the past is to use PhantomJS running on a server to generate the PDF for download/email. Usually if the content is sensitive the server (that handles authentication) would provide a single use viewing token that is then passed to a PhantomJS process. It loads the URL with the viewing token then saves as a PDF.
Further info on Phantoms screen cap API can be found here on GitHub.
https://github.com/ariya/phantomjs/wiki/Screen-Capture
Is it something you can create in Perl using PDF::API2 or PDF::Create? You can load and modify and existing PDF (handy if you want standard headers and footers), and then insert the relevant content. The learning curve can be a bit steep, but simple reports should be easy enough.
See PDF::TextBlock and PDF::Table too - they are great little helpers.
Consider this service http://pdfmyurl.com/ . I try to use many perl modules, but they dont satisfy my problems.

what is an alternate way to refer to HTML/JavaScript/CSS?

Often I need to refer to code written in HTML/JavaScript/CSS, but it is a very awkward construction to constantly refer to the descriptive trio of 'HTML/JavaScript/CSS' code.
for example, Mozilla refers to its HTML/JavaScript/CSS JetPack code as 'a JetPack'.
Other than the defunct 'dHTML', what are some concise, generic and accurate terms I can use to collectively refer to applications written in HTML/JavaScript/CSS.
I'm going to have to say DHTML anyway. Why would you say it's "defunct"? It is the perfect answer to this question. See http://en.wikipedia.org/wiki/DHTML. DHTML means Dynamic HTML—which is exactly what the combination of HTML/JavaScript/CSS code is.
Unless you're dealing with someone who isn't impressed with terms that are less than a year or two old, or unless you aren't specifically talking about code, DHTML conveys exactly what you are talking about.
Web application is perhaps too loose of a term, but it's a start.
Let's break it down.
HTML is data, CSS is presentation, and JavaScript is code. These are web technologies.
These are usually brought together by a browser.
Something in a browser on the web is a website.
JavaScript suggests it is somewhat interactive, so it's not just a site, it's an application.
("Application" also suggests that it's more complex, like with a SQL backend or something, so you might sound even more talented. :)
I'm guessing that you had the term LAMP (Linux, Apache, MySQL, and PHP) in mind? To my knowledge there is no such abbreviation for HTML, CSS, and JavaScript. The easiest way to say it is to just say it.
Versus "Front end" – I think that term implies that you built something that customers used. "Web application" is nonspecific about who the users are, so it would apply to customer-facing applications as well as internal-use applications. The word "application" implies that it's not just a tool; there are users who are not the programmers. "Front end" is probably more impressive because a customer-facing application has to be nicer than an internal one.
If you are not using it in a browser, or it's not actually on the web, maybe just your intranet or an internally distributed application bundle, it's still an application developed with web technologies.
Given that the person you're trying to convey this message to knows you're talking about web-related stuff - Front-end or Front-end development has always worked for me.
"HTML5" is the answer I now believe to be correct to replace "HTML/JavaScript/CSS". Since I asked the question in January, HTML5 has gained a lot more recognition for its incredible capabilities and promise. "HTML5" also has significantly greater name recognition than 7 months ago, and clearly sets it apart from lesser HTML.
I think the reason there's no specific term is the same reason that dHTML fell into disrepute - all three scripts are so integral to frontend development that there ceases to be a need to refer to them specifically. If you code in HTML, you almost necessarily use CSS, and if you have any active content at all it will most probably be in JavaScript.
Frontend development is a bit vague, but something like HTML based frontend development should get your point across.
If you want to refer to an application - use Web Application.
And if you need to refer to some code - use simple JS (JavaScript) because most of your code (except for some ie css expressions if you use it) will be in JS, isn't it?
Web Suite
suite: a set of things belonging together, in particular.
thus you have:
Web Suite: the set of HTML/CSS/JavaScript, the basic technologies used to develop a web site or application.
example:
"I used the Web Suite to make a cool website to show off all my pictures of cats sitting in boxes."
"UX" (User Experience) or "Front-end Development."
Web Applications, and Web 2.0 are both big names. One name/acronym that I personally like to use is RIA, or Rich Internet Application. From the article:
Rich Internet Applications (RIAs) are
web applications that have most of the
characteristics of desktop
applications, typically delivered
either by way of a standards based web
browser, via a browser plug-in, or
independently via sandboxes or virtual
machines.1 Examples of RIA
frameworks include Ajax, Curl, GWT,
Adobe Flash/Adobe Flex/AIR,
Java/JavaFX,[2] Mozilla's XUL,
OpenLaszlo and Microsoft
Silverlight.[3]
Also, someone else mentioned "impressing the suits," which this title tends to do. After all, it's got "rich" right in the name ;)
Web code
I was just having to write "HTML/Javascript/CSS" in an email and thought, "Isn't there a better term for this?". Googling, I found this post. I'm going with "web code".
Some call it a JAM stack, which stands for Javascript, API and Markup. But I acknowledge that it's not as specific as LAMP or something like that.
https://en.wikipedia.org/wiki/Solution_stack
https://jamstack.org/
However uncool it might be, it is still DHTML to me.
They are standard web technologies for producing dynamic websites and web applications. The last thing we need is another vacuous moniker for something that is more than adequately described by DHTML.
An Alternative to this Source or Page Source.
The Context all depends but for me this seemed to be a good name. When I right-click and I see "view page source" it seems relevant. it contains all of this HTML/CSS/JS.
I like Web Application but my use case was page-specific, not app-wide.
I've been calling this the web stack (HTML, CSS, JavaScript). Exclude frameworks or other tools, just the base technologies of what the web is made.

Categories

Resources