Jump to content

Idea to Improve the Documentation


Gerente
 Share

Recommended Posts

When I search for some code i usually ends on google and http://doc.babylonjs.com/ which does not provide too much code examples.

When I search in the Forum I only search inside the text of the posts, but usually the code it's inside the BJS playground.

 

An great tool would be a search box that can search inside all the codes of the BJS playground, that way we would have directly access on how to implement a specific method, function, property, or any piece of code.

 

Same as give feedback or qualification of a specific code in the BJS playground.

 

What do you think?, It is too complex to do?

 

Link to comment
Share on other sites

A basic page listing all the PG Hashes IDS would be a great start! . And then the user can click on them to enter into it an search what he is looking for, but at least he will know that inside that code that WORD will exists! And im sure there is a loooooot of code lost in the PG limbo.

 

 

Something so basic as

SELECT top 100 id FROM code WHERE Text LIKE '%' + @WORD + '%'

 

 

I can help with that if you want!

Link to comment
Share on other sites

Hi Gerente... you might want to look at this... http://www.html5gamedevs.com/topic/4983-tutorial-talk/page-8#entry88960

 

We were able to gather a DB object (3 types) that contain all playgrounds up to July 15, 2015.  It's new, so people are still building apps to browse those DB records and maybe search them and add tags.  

 

I published a slow-loading version using styled XML... for Firefox only.  http://urbanproductions.com/wingy/babylon/misc/pgs3.xml  Be patient... up to 2 minutes load-time.  It's not perfect, but it's something.  Not searchable, yet.  Feel free to develop (or borrow) some touring/search applications using those DB objects, and please share them with us. 

 

I am hoping to batch-search each playground for about 60 different keywords, and those that were found would be added to a string-array field called .tags on each offline playground record... and then re-save the DB objects (offline again).  Then each playground (in these portable playground DB's) would have tags indicating what keywords were found in each.  Better future searches.

 

I haven't started yet.  Maybe others have.  Maybe you could/would.  :)  I was going to work on them lots more, but I started learning Blender recently, and that has sucked my hours.  Thanks for any work and discoveries on our portable offline playground db.  Good luck, be well.

Link to comment
Share on other sites

u bet, thank YOU.  Do you know about this kind of stuff?  I have no DB experience to speak-of.  I tried to pull the 38 meg .json version of the db... into a webpage's JS scope.  It errored early, something about bad json format.  So, I never got to see if a 38 meg JS script residing behind a webpage... was at all sane or legal.  :)

 

Could that .json object/file be toured from a webpage like that (in-domain scope)?  Too big?  Think it would take what... an hour... to keyword-search a 38 meg 3/4-field json object? 

 

I dunno exactly how to deal with it.  My xmlpage uses XSL to transform the xml version... into a basic webpage.  It could be made lots fancier.  Still, it might be smart to add the .tags field to all DB's, and fill all the .tags arrays... with a single batch-run for 40-100 BJS-related keywords, and then re-write these DB's to disk.  Then use THOSE (that new 4-field json) in a webpage (probably 45 megs by then). 

 

The html/js-based exploring app would no longer need to do a record-by-record search through the playground code.  It would instead search the keywords of each record ONLY, and that would make a JS-based DB touring system... almost tolerable, speed-wise.  Maybe.  Am I explaining this understandably?  :)  It feels like I'm talking out of my butt!

 

Batch process the 3 objects/files first, adding and stocking the 4th field... .tags.  Re-write to disk.  Then use that new 4-field .json file... for the JS-based DB exploring app.  *shrug*

 

I dunno.  You DB Gods know all about this stuff.  If you're an expert in this kind of thing... that'd be great.  Teach us and build us a decent Old Playground Exploring System... you'll be MY hero, for sure.  Gryff's hero, too, I'm pretty sure.  Thanks!

Link to comment
Share on other sites

Im not an expert on search engine, but I have a couple of ideas as solution:

 

  • A Web App that query into a database and return result based on the search
    • 15k records is NOTHING for a database (MSSQL, MySQL, etc), but of course it will depend of the fields where you want to search. Search by a huge string (like the full code) is not the same than search by tags (short string)
    • In my opinion, search by tags sux.
    • If you want that the app "learn" then you would need to create at least a small logic relating SEARCH WORDS -> IDS.
    • You could add into the docs.babylon.js, on every method, function or property, a link to search all the PGs that contain that name. And you can have preloaded an index on each PG based on what keywords the code contains.
  • A Client App (downloadable) that
    • Some custom app (java,c, .net, etc...) can do the job,  but you would need the provide every X days with the new list of PGs Availables so the app can be always updated.
Link to comment
Share on other sites

hehe.  Nod.  Search by tags sucks, sometimes.  But it needn't be the ONLY way to search.  Maybe it's just ONE of the ways to search... and folks can use them, or go full-drill searching.  Options, options, options, we love 'em.   :)

 

Generally, I think you'll find that having an up-to-date offline DB is not all that important.  Every 6 months (X days, as you say), maybe we go get three fresh DB objects from Azure... where the PG's are stored on a PERSONAL account purchased by the primary framework author.  He's not real hip-on (not wanting) giving us daily access to that acct, and we can understand why.  Too much chance of accidentally killing the playground DB, and possibly an increase in the cost of the account IF a live-app is attached to it.

 

I suspect, at least FOR NOW, we will have to be happy-with periodic updates of the DB objects, but feel free to mount a campaign to convince the account holder of things.  :)  He's a super nice guy, and very accommodating, but you'll need a water-tight online app, and one fine idea/plan.  :)  (I shouldn't try to speak for him, that's wrong of me.)

 

Sorry that I cannot promise the world on this.  I was pretty scared when I was retrieving the objects, and I think the Azure account holder was plenty scared having me mucking around in there, too.  The very BEST playground demos... the most important ones... are listed in our tutorials and other documentation, so they can be found quite easily, but not automated, eh?

 

All in all, we can work with these objects for now.  The account owner is watching this thread, and knows that a live PG DB searcher is wanted.  You are about the 5th or 6th person to request it... but we must also respect the account holder's preferences and priorities.  You can be assured (azured? ar ar) that your words are being heard and considered. 

 

Be well, and thanks again for the interest and experiments.  If you create some off-line DB exploring apps, PLEASE offer them for DL to all of us, THANKS!

Link to comment
Share on other sites

Ok, I have this crazy idea and I want to know what you think about it:

 

 

Summary:

 

1) Create a Page to Index all the PlayGrounds into google (Right now google is only Indexing PGs that are linked in the forum).

2) Create a Page with (or add into a page) a textbox to search directly using google engine.

 

 

Detail

 

 

1) Create a page (or multiples) with the list of links of each PG available and link it to the main page of the PG.

 

 Basically something like this:

foreach(PG in PGLIST){     foreach( PGV in PG.VERSIONS){          response += "<a href=\"http://www.babylonjs-playground.com/#" + PGV.ID + "#" + PGV.VERSION + "\">" + PGV.ID + "</a>",      }}print response.

This will allow google to read all those links and index them to their content/pages!.

 

 

2) Create a search page to search directly on google:

 

"site:http://www.babylonjs-playground.com/+QUERY"

 

We can then create a textbox anywhere that open:

 

"https://www.google.com/search?q=site:http://www.babylonjs-playground.com/+ArcRotateCamera"    Where "q" would be "site:http://www.babylonjs-playground.com/+" plus the query word.

 

Like this:

<input type"text"          onblur="document.getElementById('buttonSearch').href='https://www.google.com/search?q=site:http://www.babylonjs-playground.com/+' + this.value" /><a id="buttonSearch" href="#" target="_blank"> Search </a>

Crazy is'nt?, let me know what you think!

Link to comment
Share on other sites

:)  I like the ideas, but, I'm not sure either will work.  I'm really not qualified to comment.

 

Temechon, can you show me how #2 is already done?  Let's use "godrays".  Show me a Google search that returns links to all PG's that have the word "godrays" in them.  I need to see this happen.  (thx)

 

 

The below url, as described by Gerente, DOES return the "godrays" mentioned in the built-in playgrounds, though.  (1 return)

 

https://www.google.com/search?q=site:http://www.babylonjs-playground.com/+godrays

 

It seems... (toilet humor warning)... that we need to do #1, and then #2 will work fully.  It seems we need to get Google to index all the PG's in the DB, first.  Interesting.

Link to comment
Share on other sites

Woah, Temechon, you're already working-on another version of BD?  I did not know that.  Cooooooooool.  Ya gotta tell us when you start these things, T... so we can corrupt your decisions with booze and whores and stuff.  :o

Link to comment
Share on other sites

I Still thinking that use google engine as a short term/easy to do solution while you develope a bigger documentation system it's a good option.  :rolleyes:

 

Anyway, I'll continue searching code, with my text editor, in the 40MB text file.

 

Here is the link again for new people: :ph34r:

 

http://urbanproductions.com/wingy/babylon/misc/bjs_pg_db_12JUL15.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...