Implement search across application - angularjs

I have one search text box on top bar of my angular application. Something like following.
User can type some keyword and search across application. User will have list of links with some description.
I can implement it at client side as well as at server side. I am using angular at client side and .net at server side.
Can anyone suggest me some framework available to implement these? It can be client side or server side.
I can implement it from scratch, that is not an issue. But first I want to go through solution already available.
Please suggest.

It depends on many things:
if you have very little content to search in, you may opt for a full client-side solution, but that's usually not a very good idea
if you need full-text search, and at least basic semantic features (make sure e.g. "trees" matches "tree"), you should really have a look at Elasticsearch which is pretty easy to setup, and has very good .NET bindings (look for "NEST")
if you want fuzzy suggest on keywords (e.g. tags associated on documents) and are open to paying a service to handle it for you, I can suggest Algolia (http://www.algolia.com) which is a SaaS for search and suggest and should be very reasonably priced if you are in an enterprise environment and not a high-traffic website. We are using it for that use case and we are extremely happy with it.

Related

How to develop a simple database based project

I want to start an information provider service. It works this way:
Some employees will find the information needed and fill a database manually.
Users will request data they need on their client side apps on their own platforms. Some of the project specifications is as follows: 1) Data that will go between database server and clients is really small(Suppose some ordinary images). 2) The client side apps don't need to be kept updated. Once the user of app clicks update button(for example) the app will request the server to send required information. 3)It's important to run client side apps on several platforms like: windows, windows phone, android, ios,... 4) Database doesn't need to be vary fast or vary big.
Note: And It's important to note that I'm not expert and I have some limitations. I know java and html, css, javascript. But I think those are enough for this project. (Am I right?)
So I decided to design this development architecture:
1)Using hibernate and provide a layer for server which stands above hibernate and is used to do database-specific tasks. This layer provides some protocols for client side apps to communicate with server. It enables me to change database later without changing client side apps. 2)Using PhoneGap which is a framework that uses html, css, javascript and produces apps for many platforms.
I really appreciate any suggestion, comment,... Thanks!
The fastest way in Java world would be spring boot. Basically you can configure whole application: datasource, orm, persistance layer and rest services just by adding proper annotations. There are many examples of how to do it. Basically with current implementation of spring jpa and web services you can bind mapped resources to rest services. Also current JPA can generate SQL for you using DAO method name. SO e.g. findPersonByName will generate proper sql for you (of course you need to map your db model in entities but this is also simply done with annotations).
Yes, this is a sufficient tech stack to accomplish your goal. You will have to decide how much logic to implement server-side vs app-side.
Pick a java framework for providing an API so that you can expose a restful API to your apps.
Here are a couple of comparisons from stack overflow:
Which is the best Java REST API?
Easiest frameworks to implement Java REST web services
no! for database you need server side scripting language, like php or perl, java-script is client side and will only work on browser. i recommend first learning mysql database, just the basics how to create Db, table, insert and fetch. then some PHP. i think these will set the ground for your project. '
for development environment : download XAAMP! it comes complete with Sql-database base and PHP.

Publish one product to multiple sites

Is there a way to have one product definition and have it publish to multiple sites? I am looking for this ability specifically in DNN or Umbraco, either with free or paid extensions. I did install both the platforms and played with the free extensions and looked for any extension offering such functionality but did not find one. Any links or pointers are highly appreciated!
I had looked up for this info in many places before reaching over to the expert pool here, hoping to get some hints;
In umbraco there is the built in /base extension (http://our.umbraco.org/wiki/reference/umbraco-base) which enables you to access product data that is maintained in Umbraco from other websites. Base is REST-ish so the implementation is well documented - you can access the data as XML or JSON (Returning Json instead of XML with Umbraco Base).
Also as the implementation is REST-ish the other websites that consume the content maintained in the core site could be written in anything that can consume a REST feed eg html & javascript.
It's not 100% clear to me what setup you're after, but if you're looking to set up a traditional Authoring/Delivery configuration - one of the few paid offerings Umbraco has is called Courier. It's a very reasonably priced (~$135USD,/99EUR) deployment manager that handles syncing content between two sites, i.e., Authoring and a Delivery server.
It's a very smart tool that manages content, configuration, and dependencies. It's neat and also supports a great open-source project!
If you're looking to setup something more like a centralized product database that is used by many sites - amelvin is on good pointer with BASE. They have a nice api where you may also set up your own webservice (beyond their own webservice functaionality!).
If you need this centralized product data to notify the other sites to update their caches - i encourage you to look into the 'distributedCall' functionality.
There's a bit of documentation on distributed calls in this load-balancing tutorial that may help understand the concept a bit better.
...Hope this helps get pointed in the right direction.

How does a webapp save files to its server?

I'm building a webapp where one can develop documents within the web browser (e.g., something like Zoho's document tool, or Google Docs). In my case, I have a set of arrays that store different paragraphs and other pieces of information, along with parallel arrays that store metadata on the paragraphs themselves.
The entire webapp is written in jQuery and associated libraries / plugins.
Is there an elegant way for me to save this as a file on the server itself? So far, I've been recommended using a hidden form to POST the arrays to the server and store them in a NoSQL database of some sort... This feels a bit painful to me and I'm wondering if (1) there is a more elegant approach, or (2) there is a library / framework that automates some of the sending / POSTing / saving.
Thank you!
You would need to create services that live on the server itself. These services would be methods such as (just as a simple example)
SaveDocument(User, Document)
GetDocument(User, Document)
you would need to configure your web app to call these services and pass in the required parameters. Now as for how to do this, you could write the services in any number of languages (Java using JavaEE, C# using WCF to name a few, but you can also do this in python/ruby/etc) and then generate WSDL interfaces to the services that any number of other languages could call.
There are lots of resources available on the web that cover this, so pick a language you want to learn, or are already proficient in and google around on how to develop web services in that language.
Good luck!

Is it possible to create a database driven website with flash?

I am a newbie programmer and i dont yet have any idea of the WEB. I wish to start learning a technology that will allow me to build websites( database driven) i dont know which one to choose. I know some actionscript3 and flash.
Is it possible to create a database driven website using these alone? Or do i need to learn any other technology? If i do then what should i learn? I know j2se for the desktop and oracle SQL/MySQL
please show me a path. Also wanted to know if there is any technology like Wordpress for J2EE/flash
OK so i finally got the feeling that i need to learn PHP anyway along with css and javascript. So it is fine. Also another query. Which CMS should i consider? Wordpress or Joomla?
You can develop a database driven website using Flash, but only in the same sense that you can develop a database driven website using AJAX. That is, you can build the front-end using Flash/ActionScript but the back-end is built using other technologies. Just like working with JavaScript to develop a front-end, from ActionScript you would be communicating with Java or PHP or Python or something on the server using RESTful calls and then actually working with the database in the server-side scripts.
Honestly = this question is too broad and generic, and answers are easily found with some google searches.
That being said = of course you can build a data driven flash site. The one caveat here is that flash itself is fundamentally client-side technology, so we must rely on other remote tech to do the heavy data lifting. The options are profuse.
For example, a developer might create a front facing presentation in Flex, which is the streamlined, data-centric extension of pure flash. His database interactions are written in php, and these are constantly called upon to deliver content to the user.
So - what technologies to use? Whatever you know. And if you don't know, then learn the ones that are closest to what you know.
Finally, although I am a die-hard fan of flash, this type of project (you didn't specify what you had in mind) could be done with many different technologies. So - maybe flash is the right answer, but maybe javascript (ajax) could manage the same thing and do it without the need of plugins.
Yes you can develop database driven site in flash/action script but you still need and back-end technology i recommend you to check WebORB you can develop the back-end using Java, PHP, or .NET In addition you can use Flash Remoting technology Flash/Flex to communicate with a back-end
Flash can't be directly connected to database. You must use another technique which would be "mediator". I have developed Flash game with MySql database and PHP and I recommend you to use this combination. Here is visually presented this kind of communication: http://www.youtube.com/watch?v=gRi-oxjFfCU
yes, it is possible to crate database driven website with flash and action-script. You would get an XML file when you do action script in flash, so you can store nodes of that XML file into database(mysql). You can then create an Admin interface to manage your database contents, that would indirectly change your xml nodes. So basically you can edit the xml file and store it in the database.

Query SQL Server Database from native iOS Application

I am working on an in-house, iOS app that will need read-only access to a SQL Server with multiple databases. I know the stock answer here is "write some web services", but I'd like a solution that is self-contained. Is there any way to directly connect to a SQL Server database from an iOS application? I'm thinking something like a basic ODBC connection.
I've seen a lot of users asking this question, but very few answers other than "write a web service." Is that really the only way?
A web service is indeed the only way, but Red Gate's written one you can reuse:
http://www.mobilefoo.com/iSqlServerSDK.html
http://labs.red-gate.com/Tools/Details/iSqlSDK
It's not officially released yet, just in beta, so keep in mind that features & prices may change.
Actually the easiest way is to create a MVC 3 or 4 asp.net web application. call the web methods. You don't need any API to pay for.
I use SBJson to serialize domain object and then send the objects as serialized jSOn to MVC 3. It's super easy to do. I even send images with base64, so it's .net compatible.
See my blog post with sample code:
http://nickturner.wordpress.com/2012/10/09/107/
So, after much searching and trial and error, unfortunately the best (only?) way I've found is indeed using Web Services.
Fortunately, Linq to SQL makes the WCF-creation-side incredibly easy. Once I got someone at work to walk me through setting up a Windows web server and adding the web service (and buying access to an online web server), the Windows side was up and ready to go.
I'm still working through all of the syntax stuff on the SOAP interaction side, but keeping my different methods somewhat similar in structure allows me to tinker a little until it works. By this time, I think I've gotten it to work pretty well.
So, both answers I got back were (disappointingly) correct. The only way to interact is through a Web Service. Even the 3rd party solutions they mentioned were really just convenient wrappers around the same type of technology. As it turns out, I'd rather have finer control over the process.
One word of advice: Get a real, external web server. I tried doing this on a non-Server Windows VM on my iMac/MacBook Pro, and it was like pulling teeth! Once I actually got access to an external, full, stand-alone web server, the process was much more streamlined and easy. Do yourself a favor and take that headache out of the equation!
There was a SQL ISAPI extension as part of SQLXML, but I think it has been deprecated: http://msdn.microsoft.com/en-us/library/aa226559%28v=SQL.80%29.aspx
This was effectively a pre-built, and relatively open, web service - so I'm not sure this counts as a direct connection.
You could also check out http://odbcrouter.com/Main

Resources