Bing Maps API - Why JavaScript??
-
This is a skill you need as a webdev. Much of the technology is heading (or headed) this way. I had a bit of a culture shock regarding this myself a couple of years ago. I'd principally been involved with internal ASP.NET apps (mostly the back end at that), which have been JavaScript-light. Not only that but, as you describe the lack of tooling made things hard so I rarely relished the thought of working with JavaScript. A good go at MVC3 (especially in conjunction with AJAX-y stuff & jQuery) was a real eye-opener, now I regularly do things with ease that only a year or two ago I would have considered impractical due to the effort required. I've not gotten any cleverer, just the tools are out there to do this stuff, it really is worth learning.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Thanks god I am just learning this web stuff beside my job (where I do desktop app development) in my free time to increase my knowledge. As I see it JavaScript became a victim of its own success - Whenever I search the web for a solution for a problem I encounter thousands of possible solutions and most of them are outdated an not usable for me anymore (just because they throw errors to my head, even when I invest time trying to get them working).
-
I rely on jQuery a lot (as well as things such as Knockout.js) to help tame JavaScript. It's amazing how much you can simplify JavaScript through jQuery.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
Pete O'Hanlon wrote:
It's amazing how much you can simplify JavaScript through jQuery.
Do you have any suggestions how to start best with this stuff (books, webpages etc...)?
-
Pete O'Hanlon wrote:
It's amazing how much you can simplify JavaScript through jQuery.
Do you have any suggestions how to start best with this stuff (books, webpages etc...)?
I recently worked through Head First jQuery[^] as it's become so ubiquitous I wanted something a little more thorough than the various quickstart tutorials. You could take a look at this[^] for starters, just to contradict myself :)
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Pete O'Hanlon wrote:
It's amazing how much you can simplify JavaScript through jQuery.
Do you have any suggestions how to start best with this stuff (books, webpages etc...)?
Syncfusion do a series of free eBooks[^] that are quite good.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
I recently worked through Head First jQuery[^] as it's become so ubiquitous I wanted something a little more thorough than the various quickstart tutorials. You could take a look at this[^] for starters, just to contradict myself :)
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^]Bookmarked. Thanks :thumbsup:
-
Syncfusion do a series of free eBooks[^] that are quite good.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
Bookmarked too. Thanks a lot :thumbsup::thumbsup:
-
I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .
JavaScript is the standard way to plug web components together, if they're being loaded from different domains. An ASP.net user control would simply be encapsulating the JavaScript, the wrapper div and the CSS. It wouldn't protect your key, it would still have to have that in some script that the user could find – presumably keys are linked to a domain or something similar to protect against abuse of this. If you want a user control, though, you could create one and submit it to a public repository (maybe a CodeProject article?) so that other people can have the convenience if they want.
-
I rely on jQuery a lot (as well as things such as Knockout.js) to help tame JavaScript. It's amazing how much you can simplify JavaScript through jQuery.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
Pete O'Hanlon wrote:
It's amazing how much you can simplify JavaScript through jQuery.
Surely that must have been a type - you meant DOM manipulation, rather than the Javascript language, right?
-
Pete O'Hanlon wrote:
It's amazing how much you can simplify JavaScript through jQuery.
Surely that must have been a type - you meant DOM manipulation, rather than the Javascript language, right?
I did mean DOM manipulation, but the usage of JavaScript was deliberate in that sentence. It was meant to convey the fact that jQuery could help to remove the "scary" parts for newbie JavaScript developers because so much of the heavy lifting is done for you - for instance, event handler manipulation is greatly eased with jQuery, as is features such as AJAX and usage of JSon.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .
-
They actually provide a web service and you really do not have to expose any key to the browser. Not sure what you are trying to do, but I assure you can even write a wrapper around their web services that suits whatever needs you have.
Sitalkes wrote:
They actually provide a web service and you really do not have to expose any key to the browser.
Yep, you are right (DoClickety()[^]). Was my bad, I was looking for a web solution and haven't had the Idea to look for client SOAP services (which are obviously needed to develop a client map app) which I could use for my purposes :sigh: . Thanks for putting me up to this :thumbsup:.
I am not good with signatures.
-
Pete O'Hanlon wrote:
The thing that I'm reading here is that you aren't comfortable with JavaScript development.
You kinda nailed it. To be honest, it is not the JavaScript dev thing which annoys me, it is the fact that there is not a huge support for it built-in in VS 2010... Maybe I am just a bit weak from the comfortable .Net Environment I am provided with :~ :sigh: In fact I think JavaScript is basically a good thing but it should be easier to develop - Yes, Coffe Script does it make easier (at least at the first quick glance i had one their homepage), I just haven't known it before and I am truly sorry for this fault :~:~ And I'll have a look at typescript too, thanks a lot! :thumbsup:
I've written some code to integrate into Bing Maps and when I started I could see where you were coming from. I can understand the notion of moving backwards with JavaScript when coming from a tool rich environment like ASP.NET. There is much to be learned about objects and functions that differs from our strongly typed world of C#. But I see the current iteration of JavaScript as one of the most exciting advances in web tech currently. Microsoft sees this too. HTML5 is baked into Windows 8 and most mobile operating systems. IE 9 and 10 represent a significant effort to advance support for JavaScript. (Which, honestly is just taking cues from Google Chrome) And now Visual Studio 2012 treats JavaScript as a first class citizen. Here are some links to resources that may help you see JavaScript's potential. They helped me for sure. A book called JavaScript Patterns is a great starting point for someone with a strong programming background and a little JavaScript knowledge. A video from Scott Hanselman on JavaScript support in VS 2012 Some tips for .NET developers working with JavaScript John Resig (the author of jQuery) has some interesting thoughts on Classes in JavaScript. The concept of Classes helped me make better sense of JavaScript coming from the world of C#. There are many Javascript libraries that can provide a Class implementation. I hope this helps. And I urge you to keep an open mind about JavaScript.
-
I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .
As this API will probably be used in a web site, Javascript is the most obvious way to use it (Everyone loves Javascript, isn't? :rolleyes: ).
CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...
-
I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .
There is a Silverlight version of the control...
-
As this API will probably be used in a web site, Javascript is the most obvious way to use it (Everyone loves Javascript, isn't? :rolleyes: ).
CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...
RafagaX wrote:
(Everyone loves Javascript, isn't? :rolleyes: ).
There is a difference between love and just living together because you'll get serious problems otherwise (eg because her father would show up with a shotgun if I'd move out :wtf: ) :-\ . However, I respect JavaScript as a language which is very important to webdevs. But I ain't gonna love it.
-
RafagaX wrote:
(Everyone loves Javascript, isn't? :rolleyes: ).
There is a difference between love and just living together because you'll get serious problems otherwise (eg because her father would show up with a shotgun if I'd move out :wtf: ) :-\ . However, I respect JavaScript as a language which is very important to webdevs. But I ain't gonna love it.
:laugh:
CEO at: - Rafaga Systems - Para Facturas - Modern Components for the moment...