Referencing Javascript Libraries Locally Or Externally?

Sep 13, 2010

We are currently developing an ASP.NET MVC application which will be deployed on a corporate intranet, with a slightly-modified customer facing version available on the public internet.We're making use of a number of external javascript libraries (e.g. jQuery) and a discussion has come up regarding referencing the libraries - should we reference them from an external source (e.g. via the Google load jQuery method) or keep our own version locally and reference from there?The project manager is a little concerned about having a 'dependency' on Google (or whoever) if we reference from there, and thinks that having our own copy of the library makes us more independent. On the other hand, I have heard there are a number of advantages to letting someone else host the library - for example, they handle versioning for us, Google aren't going anywhere anytime soon...

(for the purpose of the discussion assume the intranet we're hosting on has external access - obviously if it turns out it doesn't the decision is very much made for us!)So. Does this matter? And if so, what should we do and why?(I appreciate this is subjective - but it would be very useful to get advice from anyone with experience or thoughts on the matter. Not sure if this is a candidate for community wiki or not, let me know if I should have put it there and I'll know for future!)

View 5 Replies


Similar Messages:

Getting Javascript Libraries From Google / Microsoft CDNs Through SSL?

Oct 7, 2010

I'm getting a couple of libraries from Google / Microsoft CDNs.

ONLY one page on the system uses SSL but since I'm referencing libraries on the master page I'm getting the javascript libraries using the SSL so the single page that actually requires it doesn't throw security errors because accessing unsafe resources.

I've read that the browser cache doesn't work for most of the browsers if the resource is loaded using SSL, my test using fiddler indicates the opposite (Firefox and IE).

What's the truth? I'm using the CDN for improving performance so if getting the library using SSL is against my purpose, I would revert this "improvement".

I could build send the code for referencing the library on the code behind ans use SSL or not according the case, but I would like to avoid this.

View 3 Replies

Referencing CSS And JavaScript Files Relatively?

Jun 10, 2010

I have an IIS web site. This web site contains other web sites so the structure is like this.

[code]....

The problem is that it now tries to find the file at http:serverMainWebSiteScripts....

How can I work around that? Should I put all my scripts and CSS files into the root directory, is that a preferred solution?

View 3 Replies

AJAX :: Microsoftajax.js Libraries To Make My Webservice Calls Via Javascript - Services Returning Basic Types

Mar 9, 2010

I'm working with the MicrosoftAjax.js libraries to make my webservice calls via javascript, right now all my services are returning basic types, like string, int, bool. can i also have my services return things like DataSets, DataTables, or custom Classes that I have built to my javascript side?

View 3 Replies

C# - JavaScript: Referencing A Control From Another Form?

Jan 29, 2011

My displaycloud.aspx page contains two databound data lists, each for displaying a tag cloud. The datalists have an EmptyDataTemplate that holds an empty label if nothing is retrieved from the db. I am trying to display the message 'Please Log a Story', by using the code below on the companyadmin page, but I am getting an error (the controls are not on the same page). How can I reference the labels positive_tags and negative_tags from displaycloud.aspx in companyadmin.aspx? Also, I want to redirect if the EmptyDataTemplate is not executed as shown at the very bottom of the page.displaycloud.aspx:

<EmptyDataTemplate>
<asp:Label ID="positive_tags" runat="server" Text=""></asp:Label>
</EmptyDataTemplate>

[code]...

View 1 Replies

JavaScript And CSS Referencing In Master Pages With Authorization?

Mar 1, 2011

i am developing in asp.net and i use different JavaScript and CSS files.

i have a master page "masterpage1" a folder admin in this folder i have a masterpage, called masterpageadmin which inherits from the masterpage1 and all aspx files in the folder admin inherits from the masterpageadmin only the "admin" role can acess to the masterpageadmin and aspx files in the folder admin

My question:

how should i reference in my masterpage1 my JavaScript and CSS, so that the aspx files in the admin folder can use them.

View 2 Replies

Forms Data Controls :: Referencing Control In Javascript For Both EditItem And InsertItem?

Jan 3, 2011

I am using a CustomValidator to compare two textbox control values in the form view. These values are not required but must be compared if a valuue is entered. The same two controls are defined in both Edit Item Template and Insert Item Template. The formview default mode is Edit.

The javascipt for the custom validator works when in Edit mode. However, when the form view is Insert, the javascript throws an error of NullReferenceException. how I can adjust my code so that the client-side javascript works for both Edit and Insert mode?

The form view is in a content page. The script is in the Head content placeholder

<script type="text/javascript">
<!--
&nbsp;&nbsp;&nbsp; function cvSecondaryEmail_Validate(source, args)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {

[Code].....

View 2 Replies

How To Invoke Code Within A Web App That Isn't Externally Open

Sep 3, 2010

for example, you are caching data within your ASP.NET web app that isn't often updated. You have another process running outside of the app which ocassionally updates this data, when you do this you would like the cached data to be cleared immediately so that the next request picks up the new data straight away.The caching service is running in the context of your web app and not externally - what is a good method of calling into the web app to get it to update the cache?

You could of course, just hack a page or web service together called ClearTheCache that does it. This can then be called by your other process. Of course you don't want this process to be externally useable or visible on your web app, so perhaps you could then check that incoming requests to this page are calling localhost, if not throw a 404. Is this acceptable? Could this be spoofed at all (for instance if you used HttpApplication.Request.Url.Host)?

I can think of many different ways to go about this, mainly revolving around creating a page or web service and limiting requests to it somehow, but I'm not sure any are particularly elegant. Neither do I like the idea of the web app routinely polling out to another service to check if it needs to execute something, I'd really like a PUSH solution.Note: The caching scenario is just an example, I could use out-of-process caching here if needed. The question is really concentrating on invoking code, for any given reason, within a web app externally but in a controlled context.

View 2 Replies

Configuration :: Web Application Stops Working Externally?

Nov 15, 2010

My webserver stop working. It gives time out error. There is nothing in the event viewer.

If I access the web app on the web server using [URL], it works fine. Also the html pages have no problem. Just the asp.net web applications.

View 2 Replies

Controlling Which WebMethods Get Exposed Externally In A WebService?

Jan 11, 2010

I couldn't think of a decent title, so let me first apologize for that. I have a WebService (call it A) written for my app so I can take advantage of ASP.NET 3.5 AJAX features. I use the generated JavaScript proxy to make AJAX calls.As a side effect, WebService A is exposed for anyone to add as a reference to another project, which is great, except I don't want certain WebMethods to be available to external applications (in the same domain, BTW).So I've got two questions:Is there a way to control the exposure of WebMethods in WebService A?

If there isn't, I'm thinking I'll just add a separate WebService (B) that exposes the WebMethods I need from WebService A. But then,How can I prevent other applications from referencing WebService A while still allowing the application it originates in to access it?If that's not possible, I'm not really worried about it. The apps are all intranet-only, I just don't want the WebServices to be abused.Also, there is a similar question here already without any good anwers. The asker describes almost the same situation I'm in: [URL]

View 4 Replies

Configuration :: Passing Variable Externally To VB.NET Web Application?

Nov 18, 2010

I need to make the connection string in my vb.net web application be passed into the app externally. This is so I can re-driect the app to use either a test or production database. The same idea as a .INI file in a windows base system. someone suggested to me I use XML but I dont know how to do that.

View 13 Replies

Iis7 - .NET Changes To Externally Linked Config File Cause IIS Application To Restart?

Nov 25, 2010

I have a config file linked from web.config e.g.<features configSource="feature.config" />When I make changes to the "feature.config" file the IIS application appears to restart, is this expected behaviour?

View 1 Replies

C# - Share Libraries Without Using The GAC?

Sep 9, 2010

I have a library that is meant to be used by many websites. The way I am doing it now is in the library's properties, I set the "Post-build event command line" to: copy "$(TargetPath)" "$(SolutionDir)MyWebsitein$(TargetFileName)"

Every time I want a new website to use the shared library, I add a new line like this: copy "$(TargetPath)" "$(SolutionDir)MyWebsite2in$(TargetFileName)"

Is there an easy or better way to do this besides using the GAC?

View 1 Replies

 3.5 App Can Reference 1.1 Libraries - Wants To Convert?

Jan 19, 2010

We have an application coded in .NET 1.1. We plan to upgrade to .NET 3.5

But there are few core libraries written in .NET 1.1 that we use from other groups.My question is will our 3.5 app can still reference those 1.1 libraries? Or do we have convert them also to .NET 3.5?

View 3 Replies

C# - Convert Class Libraries From 3.5 To 4?

Nov 21, 2010

I have a Solution that has two class libraries. I'm trying to convert the whole solution from asp.net 3.5 to 4.

Right now the libraries are in my Visual Studio 2008 projects folder. I've installed VS 2010. Should I just copy the libraries from the 2008 project folder to my 2010 project folder and open them in VS 2010?

What is the best practices for this? The entire solution is in a single folder in my VS 2008 Project folder, and each application and class library is in their own subfolder.

View 3 Replies

C# - What Are Wss And Moss Libraries Available In .net Framework

Jul 16, 2010

In .net framework. what are libraries available for working in sharepoint and their uses

View 1 Replies

3rd-party UI Libraries For WinForms, WPF, MVC, Etc. Are Best?

Jan 1, 2010

I work with many diverse technologies, and don't possess the time to evaluate every single UI framework, so I'd appreciate hearing other coders' experiences with various frameworks.

The stuff I've worked with so far (and my perceptions):

WinForms: DevExpress (love the looks, hate the API and bloat), Krypton (free!, looks good, but limited), Telerik (don't like the looks)WPF: have only used WPF Themes pack. Asp.Net: Telerik MVC Controls (love it), jQuery UI (looks great)

View 1 Replies

Architecture :: How To Make The Class Libraries

Jan 22, 2010

Task is to develop class libraries that can be re-use in projects but assambies should be copy righted. By this I mean developer will not give the code of class libraries to the clients yet they will provide the code of there sites/ applications, these libraries will be used just as internal development libraries. I want to make Business Logic Layer, DAL, Business Objects as class libraries

Q1. How I can control unathorised use of libraries ?

Q2. How to make assamlies non extendable ?

Q3. What security measurs I should take on this.

View 6 Replies

MVC :: Designing The Class Libraries Structure?

Jan 12, 2011

I am starting an MVC application and designing the class libraries structure at the moment. I started off with the following class library structure as below.

[code]....

As there will be about 3-4 developers working on the project I thought it might be useful to split out each section of the application into their own class libraries so each developer can work on a different section without interferring with each other.

In our application we have 5 tabs e.g. Dashboard, Admin, Reports, Editor, Subscribers. Would it be wise to put each tab into its own class library like below.

[code]....

View 1 Replies

MVC :: Looking For Free Treeview Control/libraries?

Jan 11, 2010

Does anyone know of a good treeview control/libraries that is free, and fully customizable? Different nodes need to be able to have different icons/folder images. It needs dashed lines to show the parent nodes, etc, etc.

View 9 Replies

Web Forms :: How To Find Theme And Skin Libraries

Sep 18, 2010

I'm in the process of building a webforms site. In the grand tradition of programmers, I have been looking for collections of skins/themes/css for asp.net controls to avoid the work of building them myself.Especially since I'm graphically challenged. I've found numerous sites with templates for drupal, DNN, etc but the only places I've found asp.net control themes/skin/css collections is within commercial component libs that cost more than i'm able to afford.

The absence of these collections is also making me question how I'm building the site since I assume the "theme" sites would be providing these collections if there was a demand.

Can anyone point me to where I can find inexpensive or free asp.net theme/skin collections or give me some pointers about how to build a site without requiring a bunch of work to create them from scratch.

View 1 Replies

Configuration :: Deploy Application Using Excel Libraries?

Nov 30, 2010

I have some code in the web application which reads data from excel and saves to the db, and also functionlaity to generate new excel files, based on user input. ITs working ifne in local, but once deployed on the test server, i get the error

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified

For this I tried to insall the PIA 2003 version on the server, The server has only .NET 2.0 framework. FOr the PIA to install what are the requirements? A Microsoft Office Product should be present on the server?

When I tried to install on the server, I got the message "Product: Microsoft Office 2003 Primary Interop Assemblies -- Configuration completed successfully", but whn looked in GAC, the Interop excel dll was not there.

Whats worng with the installation? Whats the minimum requirement on the server to install the PIA?What are the oher options to copy PIA to the GAC in the server?

View 1 Replies

Design Guidelines For Developing Class Libraries?

Jan 18, 2010

our dev shop uses the naming guidelines as laid out in MS's MSDN content "Design Guidelines for Developing Class Libraries". It's a pain though having to refer to this via the web only. Does anyone know if this content is available in PDF or CHM format? My devs are resisting reviewing the webpage and I think sticking a portable file in their face might be more successful.

View 2 Replies

Make Enumerations Available To Multiple Class Libraries?

Jan 27, 2010

I have a Solution with a web project and some class libraries. The enumerations are in a the enumerations folder within my web project. I would like to make some of the enumerations available to other class libraries within my Solution. Should I just add another class library and call it Enumerations to my Solution so that all class libraries and my web project can access them?

View 3 Replies

Version .net Site Like Doing So With AssemblyInfo.cs In Class Libraries?

May 31, 2010

Is it possible to version a asp.net site like doing so with AssemblyInfo.cs in Class Libraries?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved