I'm attempting to improve the usability of a client's SharePoint deployment via JQuery; and am hitting a brick wall when trying to find any sort of documentation of what's happening in core.js (aside from painfully digging through and trying to parse any sort of meaning out of it --all 250kb of it!!!!--) Anyone have any pointers, or documentation?
EDIT:
Sorry, to clarify my question, i'm familiar with using JQuery with SharePoint. My question involves hooking JQuery into SharePoint's own client API. My question is inspired by this post http://www.codefornuts.com/2009/09/forcing-sharepoint-into-asynchronous.html# ; where the author is overriding methods such as "SubmitFormPost" and "STSNavigate" in order to make the UI interaction more "AJAXy".
There's no documentation for core.js and it's really a black box. Any "messing" with it would make your installation unsupported. Because of its complexity and how important it is to SharePoint working correctly, I would be very careful before adding this sort of functionality. This is not a comment on your development ability, but IMHO there would need to be a serious business case along the lines of "we don't care if things break occasionally so things look cooler".
If you really want to continue this I think your best bet is to contact Einar! His is the only post I've ever seen that describes how to do AJAXify core.js.
I'm not entirely sure what you are trying to do, but you may want to take a look at Jan Tielen's work with jQuery and SharePoint. He has some interesting posts about calling the SharePoint web services with jQuery/Ajax to build much richer UIs. These are hosted within a SharePoint web part page using a Content Editor Web Part. I've used these techniques in a couple of applications with great results.
Check out this post for an example.
Related
I have created a website for a third party, who have no experience in editing HTML. However, the third party wishes to be able to edit the content on the website without having to open the files and edit it this way, they wish to do it somewhat WYSIWYG (For example, hit an "edit" button for the content they wish to edit). Is this possible to achieve? It is not an internal website, it has user tracking (this should obviously only be available to admin users).
Is there a way of making contents of a div editable, then saving the change directly to the server, so the content gets updated publicly?
I am currently researching the topic, and although I have found some indications that the solution may be a PHP script, I have yet to find any definitive solutions or examples of similar functionality.
Yes you will need a backend language or framework to archive this. Where Javascript is used to interact with the page, the actual storage of information requires a database or similar technology.
Unfortunately which backend language or framework to choose really is the million dollar question. It largely depends on exactly what you are trying to accomplish, what your client or user is comfortable with, and how much experience you have programming.
PHP is fast and time tested backend language. Node is the new kid on the block, and it very popular also. Java and dotNet are on the way out. You can dig up a bunch more including Go, Python, Haskel, Etc.
You can use a languge listed above and start scripting away, but this can be time consuming and error prone. Most people use a framework to get started, and program using that framework's tools. The most popular PHP framework is WordPress, but it is designed for blogs and might not fit your use case. I use the framework Craft CMS which is very customizable. But the way you are phrasing the question a framework might be overkill. This is really up to you to decide after doing research into the available options and comparing them to what you wish to accomplish.
For the WYSIWYG, you might want to look into the following tools for the client to edit content:
https://imperavi.com/redactor/
https://ckeditor.com/
Hopefully this provides some direction, happy coding!
I have learned and can read/write code in JavaScript. I am a backend engineer by profession and want to learn how to build websites. I have gone to the point where I can build wireframes and start writing basic HTML. I've never succeeded in creating a complete webpage, because they always looked awful midway through.
I've seen many JavaScript frameworks (like Bootstrap, Backbone.js, and others) that one can use to create websites.
Which framework(s), if any, should I use? Which would you recommend I use to start building websites (and why, if applicable)?
I wouldn't recommend you using a JavaScript-framework to build your entire website. I would only recommend JavaScript to enhance your website with cool features.
I'm not sure what type of website we're talking about, but if you're planning on getting traffic from search engines — think twice.
Google aren't that good at reading content embedded in JavaScript. Meaning: your SEO will be terrible if you choose to build the website entirely in JavaScript.
HTML/CSS is easy, man. I'm sure you'll be able to learn that in a one day — tops! You're a backend engineer by profession for gods sake, HTML can't possibly be that hard to get a grasp of :)
I was in your exact shoes not so long ago - I'm a programmer and had no issues picking up the backend programming that is required of websites, but when designing the web page is something I just could not do. I would end up with terrible looking web pages which was very discouraging.
One great way to get around this is use HTML/CSS templates - there are plenty free ones available. Download one you like, then go through the CSS and change as much of it as you need to personalise your site. This process will also give you a great understanding of how CSS works, and how it should be used to design a page.
After doing this a couple of times, you will be confident/able enough to design a webpage from scratch. If not, continue using the templates. No harm in that.
As others have already mentioned, for a powerful, dynamic website you will need a server side language as well. Javascript frameworks like jQuery are nice for the front-end for the website. For the back-end you can try CakePHP, CodeIgniter etc., or just code the back-end from scratch. Doesn't seem that would be a problem for you.
Some sites that provide free HTML/CSS templates:
CSS Creme
FreeTemplatesOnline
Most of them are optimized for 1024x768 which might seem a little outdated for a few. Try tweaking the CSS code to make the template suitable for your purposes - change images, width etc.
You can't exactly build a website using JavaScript. You could, but that would be very inefficient...I recommend going through some HTML tutorials, as you (and the websites you build in the future) will benefit a lot from the fact that you use HTML primarily, and enhance it with JavaScript. After all, JavaScript can't do much in comparison to HTML (since in order to build a site with JavaScript (or my interpretation of what that is), you need to have a basic understanding of HTML).
Unless I misunderstood your question, then that's about it. Frameworks like jQuery can really enhance a page and make it beautiful and, fortunately, much more user-friendly.
You can't create a website (at least a dynamic one) without a server side language. There you can pull from a number of languages.
If you are just a JavaScript fan, then you can use server-side JavaScript code as Node.js. On the client side you can use jQuery and you can have a supporting database like MySQL.
I am building a web service that will make heavy use of cross-domain GET and POST data, and then update some lightbox or similar windows on the client.
Is there one JavaScript framework that is better at this, or more importantly, a framework which I should avoid?
I want to be able to put controls in the boxes. Really sexy boxes would be nice. These will be updated without page reloads.
Framework needs to be really good at the cross-domain stuff. I need good error trapping and process confirmation so that I can show the user that his connections are active.
I can use more than one framework if necessary. The bandwidth might be justified if one framework was really good at cross-domain and another was really good at windows/boxes.
Thanks,
EDIT: With regard to which frameworks to avoid, I am thinking in terms of gotchas.
I would suggest using jQuery as it's probably one of the most widespread (if not "the") javascript frameworks. There are numerous jQuery addons for sexy boxes (you just have to google), you can have it to work cross-domain
As for which frameworks to avoid: the ones that don't have an active developer community behind them, just see how often releases and fixes are released.
My favourite Javascript Framework is YUI 2.
It has a very good documentation, is actively developed since about 3 years by a big company (YAHOO). The widgets provided with the library are well structured and can be easily configured. Moreover I had never the need to rely on any 3rd party plugin (except once I needed an accorion widget), all what I need comes with the YUI or what is also very important: it can be done with what the library offers. That is something I really appreciate. I used it in all my projects since 2008 and I never got disappointed.
The packages which are especially interesting for you:
The Connection Manager: http://developer.yahoo.com/yui/connection/
and the Overlay Component: http://developer.yahoo.com/yui/container/overlay/index.html
Another alternative is Dojo (documentation found here).
Biggest problems I've had with Dojo:
Big changes across versions
Relatively mediocre documentation
In its defense, I will say that Dojo's xhrPost and xhrGet commands are pretty solid, if that's all you're using the framework to do.
One of its libraries, Dijit, also has some neat looking widgets - only some of which work as advertised (i.e. "out of the box").
Nevertheless, it's far better than writing your own cross-browser JavaScript.
Good luck!
I would say JSONP from jQuery, but lately I've seen this video from Google for cross domain calls.
For the cross-domain part I would recommend easyXDM.
Demos of this can be viewed here, I'm guessing this example is fitting for your application
I recommend jQuery, it's probably the most popular one out there.
What would be a good mini-project to get intimate with JavaScript, as an advanced 'introduction' to the language? I want to actually code an application in JS, not hook up bits of it to enhance a web application.
A lot of stuff you could learn by doing an RSS reader on a page. Google shows what can be done. The whole lection concentrates on javascript, network access, security restrictions and medium data mangeling.
If you have the ability to do any sort of backend programming than AJAX is really neat to do. You can get a lot of good effects with less efforts. A good thing to build on up.
I would argue that if you're really an advanced programmer then the exercises above would not really give you any insight into the language as they are just variations on things you probably have already done. Javascript's strongest suit is it's LISP style ability to grow. Write something AI(ish) that creates new functions. Most people don't utilize the language in this way, but, its ability to augment its own classes on the fly is, I would argue, it's most unusual and most powerful feature.
Although not a project, watch the Douglas Crockford videos at YUI theater.
The biggest web based Javascript projects are going to deal with the DOM. Do some nifty stuff with JQuery. Make a table with rows that highlight when you hover. Make them update themselves through AJAX and JSON when you click on them.
If you're really looking for something magical and usefull write a scrollable table with fixed headers and footers for IE8.
If you want to stay away from the WEB use the JDK 1.6 and run Javascript code in that. You could do TONS with that.
Whenever I'm trying to get familiar with a language, I will work on Project Euler problems with it.
I would implement a simple game like sokoban first.
The second application would be an AJAX-based multiuser chat application, first fetching other people's responses by polling, later with AJAX push.
Interesting question.
Really you could do any sort of application. In order to make sure you're using the latest and greatest stuff, I'd try making a simple CRUD style application using DHTML and AJAX. Perhaps a contacts list or calendar. If you're feeling really energetic, you could write the back-end in JavaScript as well.
Unless you want to get really friendly with the DOM and browser compatibility, I'd learn Javascript through the mask of one of the nice frameworks like Jquery or Prototype.
The Holy Grail - a WYSIWYG editor. They wouldn't need to complete it, but just seeing their plan of attack would be interesting. Plays right into patterns and OO.
I suggest you create a Google Gadget. You can create one for free and perhaps make something useful out of it. If you don't have a Google account, sign up for one. Then add the Google Gadget Editor to begin writing your code.
With the gadget, you'll be able to mess with JavaScript, JSON, CSS, etc. Furthermore, you'll be able to store the file on Google's server so you can work on it from any computer.
I created a simple RSS reader and wrote JavaScript to get the feed (using Google's API) then dealing with that JavaScript object because it came back as JSON. I then developed some JavaScript to hide/show div tags.
It was a good starter project for me to learn JavaScript.
Get JavaScript the Good Parts by Douglas Crockford. Also check out his web site: http://www.crockford.com
Key reason: just because JavaScript looks like C/C++/Java/C# doesn't mean it actually is like them. Things are significantly different. I suggest reading his book to get a grasp of those differences.
Otherwise, I would look at the JQuery web site. JavaScript is cool and all, but a good framework will save you from a lot of the pitfalls and make you much more productive faster.
try making an advanced AJAX application like for example try to recreate the google calander.
How about a firefox plugin to monitor StackOverflow? It could use RSS to monitor feeds and let you know when new questions are asked with your tags.
It could also be grown as your js skills progress.
Write yet another javascript framework, but focused specially in something, ie game programming.
I have a few .NET developers who only want to use the MS AJAX Toolkit and think JavaScript (and any JS Library) is evil. I tried to explain that if you treat client-side development like a grown-up language you can build maintainable code ... but I assume that the classic ASP days have left a mark on these guys. Anyone have a suggestion to help convince this type of developer that learning jQuery will actually benefit them in the long run as the industry is trending back to "lets get close to the metal again" w/ MVC for example?
Tell them microsoft endorses jquery and that it's shipping with MVC
If they don't realize that jQuery is the bee's knees - they're living under a rock - tell them about all of the people that are using jQuery (Google, Dell, MLB, Bank of America.....the rest of a good list is in the middle of the jQuery home page) - or just tell them that every time they go to their Netflix account they are using jQuery or if they visit the president's web site (which could backfire I guess.... ;)
Emphasize that learning a 'technology' that is becoming that ubiquitous can only help your career.
Point them to this article by Scott Guthrie.
Quick quote from the article explains all:
I'm excited today to announce that
Microsoft will be shipping jQuery with
Visual Studio going forward. We will
distribute the jQuery JavaScript
library as-is, and will not be forking
or changing the source from the main
jQuery branch. The files will
continue to use and ship under the
existing jQuery MIT license.
Ask if they like server-round-trips. (To make them understand that client-side-stuff is necessary.)
Ask if they want to write code that works in 3 different places at the same time? (To make them understand the need for a library that almost erases browser differences.)
Show them a list of who's using jQuery.
If they fancy elegant code, they will get what you're saying. Otherwise I think they'll be really hard to convince.
Implement something that has value for your organisation/clients using jQuery to prove that it works well in your context - even better if it's something that would be difficult to implement, more complex or take longer in the MS AJAX Toolkit.
Developers often find practical examples of running code in a context that applies to them more persuasive than general endorsements or lists of who else is using it (every practical technology can come up with a good list of users).
And if your developers don't like JavaScript, perhaps you should ask them what they think the AJAX Toolkit is running on the client side. The AJAX Toolkit is a JavaScript library on the client side - just one that's designed to be easily integrated into ASP.NET.
Getting up to speed on the dominant tool in a given area is always a good idea. JQuery is the dominant JS library. For some anecdotal evidence, take a look at the tags here on StackOverflow:
JQuery: 1809 items
asp.net-ajax: 272 items
ajaxtoolkit: 54 items
Tell them they can do more with less - and understanding jQuery/javascript will help them understand AJAX.NET even more. It's a big huge leaky abstraction in my books - since switching to jQuery it made web programming more fun and I could build way cooler apps.