Share My Creation B4X Library Filter Server

Aim:
Create a server that holds B4A library information in a easily searchable and linkable format.
It needs to be easy to input data. And easy to find libraries.

Implementation:
It requires you to upload your library xml file to get critical information. This code is adapter from Erel's form and upload tutorial.
The xml is parsed with a sax parser till we hit EndElement(Root). The information gained is libraryname, version, author, classes list.
This data is inserted into a simple SQLite table. (No duplicate checking is done).
The tables have the following fields: (libname,version,author,dependson,tags,description,forumlink,directlink)

On the Library list page, it uses a jQuery datatable (adapted from Erel's example on datatables). As I dont know how to do server-side filtering, the whole table is downloaded in a json array and fed to the datatable. The result is very fast filtering and searching.

Improvements required:
The project requires the following improvements:

- More annotations exported into the xml. A library description and class description annotation will help. This will mean it is easier to import the information without additional fields in the form.
- Database improvements in terms of structure and also fetching data. Concurrency. Duplication
- Prettier CSS and/or HTML
- Needs a host

How to run
Run the project with F5
In the browser navigate to localhost:51042


This is opensource, I may or may not work on this anymore.
Currently I dont have a VPS to host this on.

Thank you to @Erel for B4J and the tutorials, very useful and informative. I'm not a web guy, but it was enough for me to create a workable solution.
 

Attachments

  • LibFilter.zip
    25.8 KB · Views: 345
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm pretty sure that you already know my opinion, however how will it be different than the built-in search engine which makes it simple to filter libraries only results?

For example, here are all the images related libraries: https://www.b4x.com/android/forum/pages/results/?query=image&page=1&prefix=1

The main advantages of the built-in search engine:

1. All the data is already there and it is always up to date. There is no need to do anything special to keep it updated.
2. The search engine itself is based on Lucene which is much more powerful than using a simple substring based filter.
3. This is the same tool that you use to search for any other information about B4X products.
 

thedesolatesoul

Expert
Licensed User
Longtime User
Hi Erel,
I'm aware of your opinion and I respect that. I'm not expecting you to change anything.

But to answer your question (and this is only my opinion):
how will it be different than the built-in search engine which makes it simple to filter libraries only results?
- Any search and search engine is as good as the information put into it. There is an amazing amount of junk questions on the forum, so sometimes a more recent 'Where can I find <library>" is ranked higher than "<Library>" thread. Put simply there is too much junk and useless questions on the forum than for e.g. 3 years ago. Its makes searching so much harder. While Lucene may be more powerful than a substring based filter, it has to shift through more junk, while this tool doesnt require anything more than a substring filter. Lucene is an overdesigned solution for a simpler problem.
- With the search & find library, we end up reading more text to get to the point. Its not a clear user experience.
- With my method mentioned above, we embed all the required information to make the library searchable/categorisable into the essential files (xml) itself. This means it is searchable on any platform. Even the B4A IDE can add a search function to search the local subset of libraries for a particular class (for e.g. in the Phone library).
- Categorization. For e.g. libraries such as WebViewUtils or WebViewExtras. Nobody knows what the library does until you read everything in it, but by categorizing them in a WebView library category, and simply two clicks you can read their documentation and included functions. The search engine cannot do this (well you open two pages on the forum, and ignore the boilerplate).

Personally, I thought there is too much talk and not much 'do' on the forum. I wrote this so I can retain my right to talk. If I get time I might improve on it.
 
Top