Bing Maps API - Why 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 :( .
-
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 :( .
And what would you have in this user control? As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook. Then what do MS do for those who don't like ASP.NET? Do they then provide controls for people who prefer MVC? What about PHP developers (no picking on them please, this is serious)?
*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
-
And what would you have in this user control? As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook. Then what do MS do for those who don't like ASP.NET? Do they then provide controls for people who prefer MVC? What about PHP developers (no picking on them please, this is serious)?
*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:
As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.
I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...
Pete O'Hanlon wrote:
Then what do MS do for those who don't like ASP.NET?
I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...
Pete O'Hanlon wrote:
What about PHP developers (no picking on them please, this is serious)?
I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?
-
Pete O'Hanlon wrote:
As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.
I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...
Pete O'Hanlon wrote:
Then what do MS do for those who don't like ASP.NET?
I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...
Pete O'Hanlon wrote:
What about PHP developers (no picking on them please, this is serious)?
I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?
I'm sorry, but I disagree. Implementing the API using JavaScript is not that difficult, and the benefits of a pre-canned control that does only the basics is not enough to justify it. The thing that I'm reading here is that you aren't comfortable with JavaScript development. If you're doing web development, then it's worth your while learning it - you could even us something like TypeScrupt, or CoffeeScript if you like.
*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 :( .
-
I'm sorry, but I disagree. Implementing the API using JavaScript is not that difficult, and the benefits of a pre-canned control that does only the basics is not enough to justify it. The thing that I'm reading here is that you aren't comfortable with JavaScript development. If you're doing web development, then it's worth your while learning it - you could even us something like TypeScrupt, or CoffeeScript if you like.
*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:
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:
-
Pete O'Hanlon wrote:
As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.
I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...
Pete O'Hanlon wrote:
Then what do MS do for those who don't like ASP.NET?
I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...
Pete O'Hanlon wrote:
What about PHP developers (no picking on them please, this is serious)?
I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?
Marco Bertschi wrote:
I don't think that this user control has to provide all the possible map functions.
As soon as you start cutting functionality, people will complain about it. Creating a fully featured control will be approximately as complex as just using the JavaScript in the first place. Not only that, there'd need to be one for ASP.NET Forms, one for ASP.NET MVC one for PHP etc.
Marco Bertschi wrote:
What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...
You could implement this yourself and make it available for people to re-use, I dare say people would take it up. It will still have the same problem as above though, and wouldn't be a universal solution like the Javascript API.
Marco Bertschi wrote:
But there is maybe another solution than JavaScript?
There are other (not necessarily better) solutions. Fundamentally the API will just be making a web request call, you could implement c# to re-create this. There are also SOAP services[^] you could consume, though I guess the API sits on more a RESTful URL approach (don't know, haven't tried). These could be used to create a control such as the one you describe.
Sort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
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:
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[^] -
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 :( .
I dare say that if you looked up the number of people using JavaScript and the number of people using ASP.Net, you'd be able to guess the reason.
I wanna be a eunuchs developer! Pass me a bread knife!
-
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 :( .
-
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 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
-
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