Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a user-guide #280

Closed
danieldietrich opened this issue May 27, 2015 · 42 comments
Closed

Create a user-guide #280

danieldietrich opened this issue May 27, 2015 · 42 comments

Comments

@danieldietrich
Copy link
Contributor

Take a look at asciidoc, gitbook, etc.

@danieldietrich
Copy link
Contributor Author

We need a user guide. What are our business and technical requirements?

  • which input format, e.g. markdown, ...
  • which output format(s) (pdf, html, ...)?
  • infrastructure, e.g. how to maintain/deploy?

Additionally we need a draft of an outline.

@RobWin
Copy link
Contributor

RobWin commented Sep 17, 2015

Do you want to focus on source code examples?

  • AsciiDoctor is better than Markdown, if you want to show code examples and highlight important parts.

Do you want to be able to update the documentation on a tablet using just a Browser instead of using a developer notebook with Git and other tools installed?

  • You could use GitHub, TravisCI and AsciiDoctor for that
  • Or readme.io

Do you need offline documentation?

  • AsciiDoctor can generate the same documentation in HTML, PDF and EPUB.

@lukaseder
Copy link
Contributor

XML + XSLT = Any format! :)

@nousedaccount
Copy link

How about markdown. I think Github Flavoured Markdown is sufficient and a lot of people comfortable to write in markdown.

i will take a look to AsciiDoctor.

@nousedaccount
Copy link

How about integration with javaslang.com website. I think it cooler if documentation available on website too. So reader no need to look at github wiki.

@RobWin
Copy link
Contributor

RobWin commented Sep 17, 2015

GitHub wiki sucks.
AsciiDoctor documentation looks like this:
http://griffon-framework.org/guide/2.4.0/

As I said Markdown sucks compared to AsciiDoctor, but the syntax is quite similar.

@nousedaccount
Copy link

AsciiDoctor seem nice.

+1 for AsciiDoctor

@nousedaccount
Copy link

any idea for draft of an outline?

@danieldietrich
Copy link
Contributor Author

+1 for AsciiDoctor

@RobWin @jasoet-gdp I also thought about using Markdown because of simplicity. But asciidoc seems to be the right tool here. It is also simple but more powerful. It is a standardized way to produce documentation targeting different formats (print, web, ...). Let's take it! Compared to readme.io I prefer asciidoc because we have no vendor dependency and we are free to build our own build and deployment chain with the tools of our choice.

@lukaseder it may be tempting to use XML + XSLT. I've done it years ago with apache fop :-) My resumé: simple things are possible - complex things are masochistic ;-)

@danieldietrich
Copy link
Contributor Author

@jasoet-gdp I will write an outline this evening (GMT+1 here)

@danieldietrich
Copy link
Contributor Author

@RobWin The Griffon Guide looks awesome!

@lukaseder
Copy link
Contributor

Why masochistic? It's fun! What do you mean by "complex"? Our docs are all done with XSLT: http://www.jooq.org/learn

@danieldietrich
Copy link
Contributor Author

Maybe I'm a little out-dated here. I used fop 9-10(?) years ago. I'm sure that it emerged in the mean-time.

I prefer non-xml formats for readability reasons (less noise).

@RobWin
Copy link
Contributor

RobWin commented Sep 17, 2015

No one wants to write text in XML! :)

Have a look at http://www.asciidocfx.com/ as a nice tool to write in AsciiDoctor with a live view.
You can use the maven-plugin to convert AsciiDoc into PDF and HTML and publish it on GitHubPages.
https://github.com/asciidoctor/asciidoctor-maven-plugin

I have a build chain implemented in Gradle.

@danieldietrich
Copy link
Contributor Author

@RobWin there needs to be a business case for lukas. The consumer of the documentation will see no difference I guess. However, a xslt from xml to asciidoc should be seemlessly possible :-)
/cc @lukaseder

@RobWin
Copy link
Contributor

RobWin commented Sep 17, 2015

But the writer does see the difference, if you dont use a tool for docbook.
Asciidoc can be converted to DocBook as well.

@nousedaccount
Copy link

Okay. I'll try AsciiDoctor tonight. GMT+7 Here :)
On 17 Sep 2015 17:22, "Robert Winkler" notifications@github.com wrote:

But the writer does see the difference, if you dont use a tool for docbook.


Reply to this email directly or view it on GitHub
#280 (comment)
.

@danieldietrich
Copy link
Contributor Author

Great!

@danieldietrich
Copy link
Contributor Author

Note:

We should target all of these output formats: HTML, PDF and EPUB.

Also the documentation should be integrated on the website. Maybe we will open a new tab for now because the website is a single page.

@RobWin
Copy link
Contributor

RobWin commented Sep 17, 2015

Have a look at Spring Boot Docs too see how they are doing it with Maven

https://github.com/spring-projects/spring-boot/tree/master/spring-boot-docs

Since the documentation is in a Git Repo, you can tag it with your release and link multiple versions on your website. See as an example: http://projects.spring.io/spring-boot/

@nousedaccount
Copy link

Noted
On 17 Sep 2015 17:42, "Daniel Dietrich" notifications@github.com wrote:

Note:

We should target all of these output formats: HTML, PDF and EPUB.

Also the documentation should be integrated on the website. Maybe we will
open a new tab for now because the website is a single page.


Reply to this email directly or view it on GitHub
#280 (comment)
.

@danieldietrich
Copy link
Contributor Author

We will remove slice(beginIndex) since it has exactly the same semantics as drop(count) (even if slice() takes an index and drop() take a count).

However, subSequence(beginIndex) is still needed because it throws on invalid index.

Wrong ticket :-) Text went here to: #597

@lukaseder
Copy link
Contributor

there needs to be a business case for lukas

Exactly. I can change stylesheet, layout, versioning, formatting, etc. extremely easily using XSLT. But if you don't need that, I agree that XML is more tedious to write. It's always a tradeoff.

@danieldietrich
Copy link
Contributor Author

👍

@danieldietrich
Copy link
Contributor Author

The User Guide should give an overview over the Javaslang 2.x functionality. Here is a draft/first shot of the outline:

Lines starting with - give hints about the corresponding methods/functions, e.g. - memoized.

Tuples
Functions and Lambdas
  Unchecked vs. Checked Functions
  Function Memoization
    - memoized
  Curried Functions
    - curried
  Function Composition
    - andThen
    - compose
  Lifting Functions
  Lambda Type Reflection
    - getType
    Method References
Interface Iterable
  Equality
    - equals
    - eq
    - corresponds
Values
  Capturing State and Monadic Operations
    - get
    - isEmpty
    - map
    - flatMap
    - filter
  Conversion Operations
    - toXxx
  Side Effects
    - forEach
    - peek
    - out
    - stdout
    - stderr
Lazy Evaluation
Controls
  Option: Null Safety
  Try: Failure Handling
  Either: Disjoint Union
  Pattern Matching
Collections
  Interface TraversableOnce
  Interface Traversable
  Sequences
    Indexed Sequences
    Linear Sequences
  Sets
  Maps
  Concrete Immutable Collection Classes
  Arrays
  Character Sequences
  Iterators
  Conversions Between Java and Javaslang
    - ofAll
    - toXxx (see Value)
  Performance Characteristics
Concurrency
  Future
  Promise
Property Checking
  Generators
  Arbitrary Objects
  Properties
  Check Results and Assertions

@danieldietrich danieldietrich added this to the 2.0.0 milestone Sep 17, 2015
@danieldietrich
Copy link
Contributor Author

We should add an additional first-level section Idioms, which provides deep insight into the design of Javaslang.

Update: This should be the first section, right in front of Tuples, because it gives a first overview over Javaslang.

Idiom: Static Factory Methods

Javaslang's collection interfaces like Seq, IndexedSeq, ..., Set, ... are similar to Scala's. But there is one important difference: Javaslang does not provide static factory methods for inner interfaces (read: non-terminal types) like Seq. Exception: List, but this is not really an exception, because List is composed of Nil and Cons, so we need factory methods in the List interface.

Example:

// Scala: Seq[Int] = List(1, 2, 3)
val seq = Seq(1, 2, 3)

// Javaslang: Seq<Integer> = List(1, 2, 3)
final Seq<Integer> seq = List.of(1, 2, 3)

What we see is, that Scala provides a default implementation for Seq, which is List. In Javaslang, we keep the (Java) code clean of any kind of implicit defaults, conventions over configuration magic etc. Everything is explicit, the user has to choose the behavior. This makes the code readable and predictable and we are able to reason about it.

Update: There is always an exception. Stack is an interfaces, extended only by List. Scala removed Stack, we keep it to define a clear interface for Stack operations.

@danieldietrich
Copy link
Contributor Author

@jasoet-gdp @RobWin in a first step we should setup asciidoc within our project. E.g. by adding it to the pom.xml. The resources should not be included in a 'normal' build/jar. It is ok, if we build it locally 'by hand' in a first step, i.e. it is not necessarily needed to be built automatically with a travis-ci build for now.

Question: Are there any best practices for the (maven) folder/project structure, e.g.

  • src/main/asciidoc
  • doc/...
  • src-doc/...

If we have the build up and running, the second step is to create the outline (without content). It would be cool to see html, pdf and epub at this stage :-)

@RobWin
Copy link
Contributor

RobWin commented Sep 18, 2015

Is Javaslang a standard GitHub account or an organsiation?
Create another repo or maven module called javaslang-docs and the folder src/main/asciidoc.
Create an index.adoc which includes all other files and specifies some constants. See as an example https://github.com/spring-projects/spring-boot/edit/master/spring-boot-docs/src/main/asciidoc/index.adoc

@danieldietrich
Copy link
Contributor Author

Thx! Javaslang is currently a GitHub account. I hesitated to convert it to an Organization because there is no way back and I don't know the benefits. Can you explain?

@RobWin
Copy link
Contributor

RobWin commented Sep 18, 2015

Add the AsciiDoctor maven plugin

<plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                        <version>1.5.2.1</version>
                        <executions>
                            <execution>
                                <id>generate-docs</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>process-asciidoc</goal>
                                </goals>
                                <configuration>
                                    <sourceDocumentName>index.adoc</sourceDocumentName>
                                    <backend>html5</backend>
                                </configuration>
                            </execution>
<execution>
            <id>output-docbook</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>process-asciidoc</goal>
            </goals>
            <configuration>
                <backend>docbook</backend>
                <doctype>book<
            </configuration>
        </execution>                        </executions>
                    </plugin>

https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoc-to-html-example/pom.xml

@nousedaccount
Copy link

I think its better if javaslang converted to Organization. So more people (github account) can associate with it.

For AsciiDoctor there are a lot of example using maven plugin https://github.com/asciidoctor/asciidoctor-maven-examples. We just need to pick what we need.

@danieldietrich so, which repository that we will use to store User-Guide. I think its better if user-guide repository separated from main javaslang repository.

@RobWin
Copy link
Contributor

RobWin commented Sep 18, 2015

In an organisation you can have multiple repos under one common name and you can create teams and add members to teams which are allowed to contribute to different repos.

@nousedaccount
Copy link

@danieldietrich @RobWin and if javaslang in an organization, we can create a repo contains example usage for javaslang in conjunction with other framework such as Spring Framework, Spring Data JPA, Jackson JSON Module, etc. And assign team to maintain each repo.

@danieldietrich
Copy link
Contributor Author

@jasoet-gdp @RobWin this all sounds really exiting. The only stopper of progress can be only 'fear' - as always in life... My fear is to loose control, e.g. about growth. Let me sleep one night about that and I will create an organization :-)

@danieldietrich
Copy link
Contributor Author

@jasoet-gdp @RobWin Done. Javaslang is now an organization. Feels good :-)

@danieldietrich
Copy link
Contributor Author

Wooaah - this turns out to be complicated. Whom to invite to the organization an whom not??

@danieldietrich
Copy link
Contributor Author

@jasoet-gdp @RobWin I've created a new repo javaslang-docs. You will get write permissions there when joining the organization.

@RobWin
Copy link
Contributor

RobWin commented Sep 18, 2015

You dont have to add us as Team members. We still can and should contribute via PRs.

@danieldietrich
Copy link
Contributor Author

Ok. What is your suggestion regarding whom to invite to take part of the open source organization? How do other companies organizations it?

@danieldietrich
Copy link
Contributor Author

I like to have a team of committers - active or not.

@danieldietrich
Copy link
Contributor Author

PR's are important. They need to be mentioned in the CONTRIBUTION file (which needs a rewrite). I like the Typelevel Scala CONTRIBUTION.md.

@danieldietrich
Copy link
Contributor Author

Documentation has now its own home (and issues). We close this ticket. Next we will create an outline.

See vavr-io/vavr-docs#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants